Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

How can we locate the id of a dynamic element using selenium IDE.

View previous topic View next topic Go down

How can we locate the id of a dynamic element using selenium IDE.

Post by syamrajk on Tue Oct 25, 2011 10:31 pm

Hello,

I would like to test the adchoice button that are coming along with websites that has the ads from adservers. but as you all know the id of the adchoice button is dynamic and so i can't get the id when i am playing back the saved test suite.

Its giving me an error " [error] Element css=#te-0720-anch-mo > span > img not found "



I tried -

//input[starts-with(@id, 'span')]


//input[starts-with(@xpath, 'span')]


//span[container(@id,'span')]



//span[container(@csspath,'span')]




but i was not able to give any stable id. so all the above steps failed.



any help would be appreciated.

syamrajk

Posts : 1
Join date : 2011-10-25

Back to top Go down

Re: How can we locate the id of a dynamic element using selenium IDE.

Post by sujit_37 on Tue Nov 01, 2011 3:16 am

I guess u should try using Assignid() command.
With this we can assign id to any element and can call the element with a user given id.
I dint try this..but it may work

sujit_37

Posts : 2
Join date : 2011-11-01

Back to top Go down

Re: How can we locate the id of a dynamic element using selenium IDE.

Post by sujit_37 on Tue Nov 01, 2011 3:21 am

assignId ( locator,identifier )
Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded.
Arguments:

locator - an element locator pointing to an element
identifier - a string to be used as the ID of the specified element

sujit_37

Posts : 2
Join date : 2011-11-01

Back to top Go down

Re: How can we locate the id of a dynamic element using selenium IDE.

Post by Sponsored content Today at 3:11 pm


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