Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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