Share
Go down
lokesh_chandra
Posts : 6
Join date : 2011-05-24

(Need help urgently)How to locate and click an image with dynamic id

on Wed May 25, 2011 6:16 pm
Hi everyone,
I am still finding difficulty in locating an image with dynamic id. I have tried everything but unable to find any solution. The biggest problem is that the target is labeled through id only any the id is continuously changing. Even i tried to take the Xpath excluding the id part but still it gives an error(Element not found). What should I do to solve this problem. Please help as I am new to Selenium IDE. Thanks confused
freesky
Amateur
Amateur
Posts : 72
Join date : 2011-04-13

Re: (Need help urgently)How to locate and click an image with dynamic id

on Fri May 27, 2011 8:55 am
If dynamic id contains some same part,such as 'ab*',the '*' is changed every time,but the 'ab' is fixed,so u can use 'contains()' in xpath.
lokesh_chandra
Posts : 6
Join date : 2011-05-24

Thanks for your feedback!

on Fri May 27, 2011 5:57 pm
Hi freesky,
I must thank you for your feedback.Finally it's working now and good to see so much support on this forum. Keep up the good word. There is one request kindly reply for the questions little bit early. Rest everything is really helpful on here.
Thanks
annapoorna
Posts : 1
Join date : 2011-06-22

Re: (Need help urgently)How to locate and click an image with dynamic id

on Wed Jun 22, 2011 12:15 pm
Hi

Can you please tell me how to locate an image on a web page using the id???????????
lokesh_chandra
Posts : 6
Join date : 2011-05-24

Re: (Need help urgently)How to locate and click an image with dynamic id

on Wed Jun 22, 2011 12:42 pm
Hi annapoorna,
Yes there is a very easy solution for this either you can use CSS or i suggest you to use xpath. Now you must be thinking from where to get the xpath,then here is the solution. Right click on the image with dynamic id and then click on "Inspect Element" if you have installed firebug add-on on your firefox browser.Then it will highlight the element link below.Go to that link and right click on that and there you will see and long menu.From that menu click on "Copy Xpath" and then you can use that Xpath wherever you want to use and you will find it's all working.
Hope this might help you...
Feel free to contact me for any queries on my mail id-lokeshima@gmail.com
Sponsored content

Re: (Need help urgently)How to locate and click an image with dynamic id

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