Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by lokesh_chandra 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

lokesh_chandra

Posts : 6
Join date : 2011-05-24

Back to top Go down

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

Post by freesky 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.

freesky
Amateur
Amateur

Posts : 72
Join date : 2011-04-13

Back to top Go down

Thanks for your feedback!

Post by lokesh_chandra 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

lokesh_chandra

Posts : 6
Join date : 2011-05-24

Back to top Go down

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

Post by annapoorna 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???????????

annapoorna

Posts : 1
Join date : 2011-06-22

Back to top Go down

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

Post by lokesh_chandra 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

lokesh_chandra

Posts : 6
Join date : 2011-05-24

Back to top Go down

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

Post by Sponsored content Today at 8:55 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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