Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How to verify all elements present in application.

View previous topic View next topic Go down

How to verify all elements present in application.

Post by vidyasagar on Fri May 14, 2010 1:39 pm

I know the procedure if all elements in a page have ids associated with..but what if they don't have ids...in that case how can i verify all the elements present in page/application..can i find the xpaths of all elements{buttons,inputs,fields etc..}..can anyone please explain in detail


Thanks in advance,,
Regards,
Vidyasagar
Beginner in selenium

vidyasagar

Posts : 3
Join date : 2010-05-10

Back to top Go down

Re: How to verify all elements present in application.

Post by metman on Fri May 14, 2010 11:19 pm

Yup, you can use xpaths. You can also use xpaths relative to id. Also, you can identify elements by other attributes than ID, if they have them. In general, follow the pattern foo[@bar='baz']/xpath where foo is the element type, bar is the name of an attribute, and baz is the value for the attribute you are trying to target. Xpath is of course the relative xpath from that targeted element. If you have multiple elements that have the same attribute, you can use the standard square bracket formatting to index whichever element with that attribute value you want.

metman
Amateur
Amateur

Posts : 58
Join date : 2010-04-02

Back to top Go down

A solution

Post by vidyasagar on Sat May 15, 2010 11:28 am

@metman ..thanx for ur reply..but it wont work if i want to store all anchor elements with //a...but having different ancestors...
finally i find a way to solve this issue...here it is...
1.find the no. elements using xpathcount (here we are trying to find all anchor elements...i.e."//a"
2.now try to click the anchor element by
/descendant::a[1]
/descendant::a[2]
/descendant::a[3]
/descendant::a[4]
...........................



/descendant::a[last()] or /descendant::a['xpathcount']

vidyasagar

Posts : 3
Join date : 2010-05-10

Back to top Go down

Re: How to verify all elements present in application.

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum