Share
View previous topicGo downView next topic
SasanG
Active particpant
Active particpant
Posts : 11
Join date : 2010-07-29

the components of pages are dynamic id

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 ???
anandj82
Posts : 4
Join date : 2011-05-16

Re: the components of pages are dynamic id

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
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: the components of pages are dynamic id

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/
Sponsored content

Re: the components of pages are dynamic id

View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum