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

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


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