Book: Getting Started with Selenium IDE

Book: Getting Started with Selenium IDE(2012)

 

Keyboard Shortcuts

X = Execute Line

 

Commands

 

Targeting Methods

id=but2

link=Index

Filters

name=

value=

 

DOM

dom=document.getElementById("but1");

dom=document.links[0];

 

XPATH

XPATH must parse the entire page to breakdowm DOM object

// or /html

Normaly ‘//’, but ‘/’ can be used with html

 

xpath=//input

xpath=/html/body/dv[2]/div[3]/input

nth Element

//input[2]

//div[5]

Element Attributes

//div[@class=’mainbody’]

//div[@class=’leftdiv’]

//div[@class=’centerdiv’]

//div[@id=’find’]

Partial Matches

//div[starts-with(@id,’time_’)]

//div[contains(@id,’time_’)]

/div[contains(text(),’element has a ID’)]

//div[text()=’This element hsa a ID that changes every time...’)]

Axis

//input[@value=’Sibling Button’]/preceding-sibling::input[@value=’Button with ID’]

ancestor

descendant

following

following-sibling

parent

preceding

preceding-Sibling

CSS

css=cssSelector

 

css=div.leftdiv

div[class=’leftdiv’]

 

 

 

 

 

 

Tags