Rgd: Dynamic id changing for id_please advice how to capture

45 views
Skip to first unread message

karuna nidhi

unread,
Feb 21, 2018, 8:13:07 AM2/21/18
to seleniu...@googlegroups.com
Hi All,


I have try to execute the below xpath values, the ID is changing dynamically .



.//*[@id='grid_184']/div[1]/table/tbody/tr[2]/td[2]/div/img


.//*[@id='grid_331']/div[1]/table/tbody/tr[2]/td[2]/div/img


please advice how to capture this one.






Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

Venkata Anil Babu G

unread,
Feb 21, 2018, 8:14:49 AM2/21/18
to seleniu...@googlegroups.com
Can you try identifying based on the label using following sibling option in x path 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAPVy0jd-RTDNr_qbKqdtDjVAwBmb6Odi3Wm2_AZaw5Mqtj%3DByA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

karuna nidhi

unread,
Feb 21, 2018, 8:32:36 AM2/21/18
to seleniu...@googlegroups.com
little confuse  below xpath.please advice.


//label[starts-with(@id,' grid_')]/div[1]/table/tbody/tr[2]/td[2]/div/img







Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

On Wed, Feb 21, 2018 at 6:43 PM, Venkata Anil Babu G <anilb...@gmail.com> wrote:
Can you try identifying based on the label using following sibling option in x path 

On Wed, 21 Feb 2018 at 6:42 PM, karuna nidhi <karunate...@gmail.com> wrote:
Hi All,


I have try to execute the below xpath values, the ID is changing dynamically .



.//*[@id='grid_184']/div[1]/table/tbody/tr[2]/td[2]/div/img


.//*[@id='grid_331']/div[1]/table/tbody/tr[2]/td[2]/div/img


please advice how to capture this one.






Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CACvSptd-p-3WgLmu_aovCMy1CY6fwOPFREW%3D%3D-7nQ1DCeXZ%3DEQ%40mail.gmail.com.

karuna nidhi

unread,
Feb 22, 2018, 2:56:50 AM2/22/18
to seleniu...@googlegroups.com
Friends,

I have try to write as below, but not working.

driver.findElement(By.xpath("//div[starts-with(@id 'grid_']/div/table/tbody/tr[2]/td[2]/div/img")).click();







Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

On Wed, Feb 21, 2018 at 7:01 PM, karuna nidhi <karunate...@gmail.com> wrote:
little confuse  below xpath.please advice.


//label[starts-with(@id,' grid_')]/div[1]/table/tbody/tr[2]/td[2]/div/img







Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

On Wed, Feb 21, 2018 at 6:43 PM, Venkata Anil Babu G <anilb...@gmail.com> wrote:
Can you try identifying based on the label using following sibling option in x path 

On Wed, 21 Feb 2018 at 6:42 PM, karuna nidhi <karunate...@gmail.com> wrote:
Hi All,


I have try to execute the below xpath values, the ID is changing dynamically .



.//*[@id='grid_184']/div[1]/table/tbody/tr[2]/td[2]/div/img


.//*[@id='grid_331']/div[1]/table/tbody/tr[2]/td[2]/div/img


please advice how to capture this one.






Thanks & Regards,
Karunanidhi.E
9994789611/9443038011

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Xiang Dong

unread,
Feb 23, 2018, 3:33:22 AM2/23/18
to karuna nidhi, seleniu...@googlegroups.com
not include id in your xpath. an absolute xpath will be fine for this case. 

--david

From: seleniu...@googlegroups.com <seleniu...@googlegroups.com> on behalf of karuna nidhi <karunate...@gmail.com>
Sent: Thursday, February 22, 2018 3:56 PM
To: seleniu...@googlegroups.com
Subject: Re: [selenium-users] Rgd: Dynamic id changing for id_please advice how to capture
 
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages