"working" a web site from Rev

Ken Ray kray at sonsothunder.com
Tue Aug 16 17:48:02 EDT 2005


On 8/16/05 4:29 PM, "Jon" <jbondy at sover.net> wrote:

> I want to write a Rev program to make sure that a web site I've written
> is still functioning correctly, perhaps once an hour, 24/7.  The
> manipulations for a person are pretty simple:
> 
> 1) go to a fixed URL
> 2) click a button
> 3) go to the bottom of the page
> 4) check a check box
> 5) click a button
> 6) verify that the received HTML contains some key phrases.
> 
> Is it easy to do this in Rev?  Any sample stacks you can recommend?

Well, that actual button clicking can't be done with Rev, but you can
simulate it by passing the parameters with the url string that would
normally be sent when you click the button in a ' get url ' call. For
example, suppose I had a simple form on a web page for name and email
address with a "submit" button. When the submit button is clicked, it sends
that data to the CGI on the server (let's say it's
"www.123.com/cgi-bin/testcgi"). I could simulate the submit button for the
person "Test" with email address "test at test.com" like this:

put urlEncode("Test") into tName
put urlEncode("test at test.com") into tEmail
get url("http://www.123.com/cgi-bin/testcgi?" & tName & "&" & tEmail)

--> now "it" contains the source of the page that would be displayed after
the submit button was pressed

Hope this helps...


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com





More information about the use-livecode mailing list