HTTP Task, how do I check for text on page and fail if not found. - VisualCron - Forum

Community forum

Casey
  •  Casey
  • No customer Topic Starter
2015-09-30T10:25:48Z
Hi,

Hi, I'm really new here.

I would like to check a webpage for a specific string of text. The web page would just say success when it was up and running, if it didn't say success the job should fail. I can't figure out where I would test that condition as the job always says it was successful.

Thank you for your assistance.

thomas
2015-09-30T11:06:03Z
I guess you have save the content to a file, and check the file for the string you are looking for.
So first a HTTP Get task + save content, and then you have many options. I would probably use a .NET task like this (remember to ad the using statement on top):

dotnettask.PNG
ErikC
2015-09-30T11:23:56Z
Hi Casey,

I have such a thin in place at the moment.
2 tasks:
1) HTTP task
2) e-mail task

1) the HTTP task goes to a website. In the output of the task you can see the HTML of the page.
2) the email task mails an error mail, but it has a condition bound to it.

The conndition checks if there is a specific string in the HTML task output. If it's there the condition is set to exit the job (no email) and if there is a match it will continue so the email will be send.

Regards
Erik
Uses Visualcron since 2006.
Casey
  •  Casey
  • No customer Topic Starter
2015-10-01T09:59:43Z
Thanks to both of you, that was very helpful.

Unfortunately it seems our mail server is not compatible or something. Exception in Task: User authentication failed: Unaccepted server reply for command dXNlcm5hbW (error code is 535) (error code is 535)

I know my login information is correct so not sure what else I can do here.

thomas
2015-10-01T10:16:38Z
Post pics of the connection you are trying. What type of mail server do you have?
Casey
  •  Casey
  • No customer Topic Starter
2015-10-01T10:26:12Z
Originally Posted by: thomas 

Post pics of the connection you are trying. What type of mail server do you have?



icewarp is our mail server.

There isn't much an image would do here. I use the same username I use for a local ColdFsuion server I'm running and that connects correctly.

The userName is just a name without @ or domain

u: cdougall
p: xxx
Port 25
No SSL or encryption as it's an internal server

It finds the server, it just can't authenticate...

Exception in Task: User authentication failed: Unaccepted server reply for command dXNlcm5hbWU9ImNkb3VnYWxsIiwgcmVhbG09ImNmZ3Y5LmNvbSIsIG5vbmNlPSJaREE0TWpkbE9HVTRZamhqIiwgZGlnZXN0LXVyaT0ic210cC8xNjUuNzkuMjM4LjEwMCIsIHFvcD1hdXRoLCBjbm9uY2U9ImJkYjVlNWM5IiwgbmM9MDAwMDAwMDEsIHJlc3BvbnNlPWRiOTRhYjQ1N2UwNjliMjc5MWI2ODI0ZTgxNjc2MzZj (error code is 535) (error code is 535)
Scroll to Top