All,
 
Anyone out there got any experience using selenium to drive mouse events that are more complex than clicking like dragging.
 
Thanks in advance,
Nate
----- Original Message -----
From: Ken Mizell
Sent: Wednesday, November 02, 2005 5:20 PM
Subject: [Selenium-users] help with optional actions

Hi All
I can't be the only one trying to solve this problem...  is there anyway to create optional actions?
I'm having trouble when i run a script and then re-run it and the cookies on my machine make certain checkboxes "checked" the second time through.
There is an input field ( a checkbox) that has a different value after the script has been run once  [EMAIL PROTECTED]'CBB_info' and @value='1'  or [EMAIL PROTECTED]'CBB_info' and @value='0'
and the second time through the test the script fails because it can't find this checkbox with the checked value.  what i really want it to do is to look for the checkbox and if it sees the check box is checked then uncheck it, but if it is not checked then do nothing and go to the next step in the test.
 
2 possible solutions i'd like to know about:
1. is there a way to create an "optional" action like:
<tr>
 <td>OptionalClick</td>
 <td>//[EMAIL PROTECTED]'CBB_info' and @value='1']</td>
 <td></td>
</tr>
where if the attempted click fails the test ignores this failure and continues?
 
2. or a more robust solution
<tr>
 <td>IfValueOf</td>
 <td>//[EMAIL PROTECTED]'CBB_info']</td>
 <td>'1'</td>
</tr>
<tr>
 <td>ThenClick</td>
 <td>//[EMAIL PROTECTED]'CBB_info' and @value='1']</td>
 <td></td>
</tr>
 
is there any way to do If Then Else logic in a selenuim script?


_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.7/157 - Release Date: 11/2/2005
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to