Selenium Command Examples

Version 15.1 by Kieran Kelleher on 2007/11/29 11:20
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Click a link having css class 'selcreateteam'

 clickAndWait  //a@class='selcreateteam'  

Add the first element of a list browser (aka. 'select' element) to the current selections. The list browser is identified by css class 'selbrowserlist'

 addSelection  //select@class='selbrowserlist'  value=0 

Add the third element of a list browser (aka. 'select' element) to the current selections. The list browser is identified by css class 'selbrowserlist'

 addSelection  //select@class='selbrowserlist'  value=2 

Add the item named "John Murphy" of a list browser (aka. 'select' element) to the current selections. The list browser is identified by css class 'selbrowserlist'

 addSelection  //select@class='selbrowserlist'  label=John Murphy 

Store the current value of an input field into a script variable. The input field is identified by the css class "selEditTeamteamName" and we are storing the current field value into a script variable named "varEditTeamteamName"

storeValue//inputvarEditTeamteamName

Use a stored variable later in the script (on a different page or whatever) to click a dynamic hyperlink that uses the stored value as the hyperlink text

clickAndWaitlink=$Unknown macro: var_EditTeam_teamName. Click on this message for details.