Share
Go down
sreenath
Posts : 3
Join date : 2011-04-26

How to handle the dynamic ids in selenium IDE

on Tue Apr 26, 2011 10:14 pm
Hi All,

I have recently started with selenium IDE for smoke test porpose.

I had a serious problem due to environment change in application. For example....

Previously my code like - viewPC_7_EMCVDGL10023E023O5G5711OM2_:newbatch:bdate

Current code is - viewns_7_EMCVDGL10023E023O5G5711OM2_:newbatch:bdate

Can anyone please suggest me...

Regards,
Sreenath
9916994123
Lavanya_K
Posts : 7
Join date : 2011-04-20

Re: How to handle the dynamic ids in selenium IDE

on Sat May 07, 2011 6:31 pm
Hi Sreenath,

you can try using xpath . In that you can use starts-with , contains, ends-with depending on the situation.

In your example above, the starting point is varying... viewPC and then viewns

so you have to use contains

in the target box
//div[contains(@id,'_EMCVDGL10023E023O5G5711OM2')]

Let me know if it works.

Thanks,
Lavanya.
avatar
selenium.testing07
Regular Participant
Regular Participant
Posts : 26
Join date : 2010-11-20

Re: How to handle the dynamic ids in selenium IDE

on Tue May 10, 2011 6:16 pm
Sreenath,

You have to use some path locator like Xpath etc.
and find out something static or you can also use particular place like
Table row column etc, and store the value in a variable.

Hope this logic will work

Cheers,
sreenath
Posts : 3
Join date : 2011-04-26

Re: How to handle the dynamic ids in selenium IDE

on Wed May 11, 2011 6:00 pm
Thanks for the update Lavanya...

Regards,
Sreenath
sreenath
Posts : 3
Join date : 2011-04-26

Re: How to handle the dynamic ids in selenium IDE

on Wed May 11, 2011 6:01 pm
Thanks for the update.


Regards,
Sreenath
Sponsored content

Re: How to handle the dynamic ids in selenium IDE

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