Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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


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