> From: Médoune Mbow > > Currently I will want to add one or any actins which will enable me to > simulate the loop [for(i=0;i<7;i++)] as in java, c++, python........
For this kind of scenario, the table style of Selenium is limiting. I'm working on a new syntax for Selenium tests... basically a re-implementation of HyperTalk. Table tests would still be supported for the simple stuff. This new syntax would be an addition to the family. I call this new language "SweetTalk". For your example, the code would look like the following: ########################################### <html> <title>Sample "SweetTalk" Script</title> <script language="sweettalk"> function login name password go to url "http://yourwebpage.com" click button with name "log in" type name into field with name "username" type password into field with name "password" click button with id "submit" end function script test_repeated_login_failure_triggers_lockout repeat 5 times login with name "jason" and password "1234" verify document.content contains "Login failed. Try again." end while go to "http://yourwebpage.com" login with name "jason" and password "1234" verify document.content contains "Login failed. Your account is now locked. Please email [EMAIL PROTECTED] for help." end script do test_repeated_login_failure_triggers_lockout </script> </html> ########################################### Of course, this is vaporware at the moment. I'm playing around with implementing the grammar using the Pyparsing module. Once I get that to work, I'll need to port Pyparsing to JavaScript. (Sweettalk will officially be implemented in JavaScript so that it "lives" in the browser just as Selenium currently does. This won't be easy and is not exactly fun... but writing tests in SweetTalk will be! :-) -Jason _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users