Forum OpenACS Development: tclwebtest and formbutton's

Collapse
Posted by Austin Andreasen on
I am in the process of writing an automated test, and I am stumped. The test is to simulate a user checking out of an online store. The store is in beta so I have been using www.fao.com as a model, since they will be very similar. The problem is this: I cannot, for the life of me, get TCL or tclwebtest to recognize the buttons.... AHhhh!!

Here is an example of the code from the fao page:

<div id="atc"><input name="submittag" class="formbutton" onclick="javascript:setAddTo(1, personalization)" value="Add To Cart &gt;&gt;" type="button"></div>

and the URL I got it from is:

http://www.fao.com/catalog/search_command.cmd?form_state=frmKeywordSearch_ln&sortByColumnName=NAME&keyword=834363

Basically, all I need is to push the button and have the cart have the item in it. ***ANY*** advice would be greatly appreciated and my thanks in advance

- Austin A
  10/12/06

Collapse
Posted by Vinod Kurup on
I don't think tclwebtest handles javascript. I just went to that site and turned off javascript and the buttons then no longer work.

I'm not sure what the options are for testing javascript-enabled sites. Maybe Selenium? http://www.openqa.org/selenium/

Collapse
Posted by Austin Andreasen on
I like that! It works great. Only problem: I need to be able to kick of the test with a batch of other tests which are already written in TCL/tclwebtest. Do you know of a way to kick off the Selenium script from within TCL?
Collapse
Posted by Vinod Kurup on
Sorry, I don't know of a way to call Selenium scripts directly from Tcl. There is a product called SeleniumRC which allows you to control Selenium from various programming languages, but I don't think Tcl is one of them. I see Java, .NET, Perl, Python and Ruby. Maybe you can write a Tcl binding :)