Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

the components of pages are dynamic id

View previous topic View next topic Go down

the components of pages are dynamic id

Post by SasanG on Thu May 05, 2011 10:13 pm

Hi all


i need help for resolve this problem.For example

for id i have ext-gen419 this change always
for //div[@id='ext-gen419'] xpath:atribute is useful this change always
for //div[@id='ext-gen401']/div[2] xpath: relative is useful this change always
for //div[8]/div[1]/div[2] xpath: position ..when is running don't find it

how can resolve this problem ???

SasanG
Active particpant
Active particpant

Posts : 11
Join date : 2010-07-29

Back to top Go down

Re: the components of pages are dynamic id

Post by anandj82 on Tue May 17, 2011 1:31 pm

Does your page contains just one ext-gen id? If its just one then you can use
//div[contains(@id,'ext-gen')] to get the element. This will give you the First element that contains ext-gen in ID.

As far as possible you shouldn't use hardcoded XPATH. CSS or better XPATHs are the answer

anandj82

Posts : 4
Join date : 2011-05-16

Back to top Go down

Re: the components of pages are dynamic id

Post by rohit13 on Fri Mar 30, 2012 3:45 pm

Try to locate element by type/class/xpath/name/text instead of ID.

Otherwise just provide more information related to element that you are trying to locate.

_________________
Radical QA
http://radical-qa.blogspot.in/
avatar
rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA

http://radical-qa.blogspot.in/

Back to top Go down

Re: the components of pages are dynamic id

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