Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

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

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
avatar
freesky
Amateur
Amateur
Posts : 72
Join date : 2011-04-13

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

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.
avatar
lokesh_chandra
Posts : 6
Join date : 2011-05-24

(Need help urgently)How to  locate and click an image with dynamic id Empty Thanks for your feedback!

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
avatar
annapoorna
Posts : 1
Join date : 2011-06-22

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

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???????????
avatar
lokesh_chandra
Posts : 6
Join date : 2011-05-24

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

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

(Need help urgently)How to  locate and click an image with dynamic id Empty 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