Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Problems using dynamic paths in Selenium IDE

View previous topic View next topic Go down

Problems using dynamic paths in Selenium IDE

Post by dogbro on Tue Jul 17, 2012 8:34 pm

Hi! I use Selenium IDE for testing a bunch of common use
cases on new releases of a web application. I have a number of scripts that I
run which do things like creating and editing documents. Etc.

I have a problem with relative paths (or is it called
dynamic paths) which this webapp uses a lot and makes testing almost
impossible. Several use cases require that you navigate between documents using
a treeview which utilizes relative paths which change from time to time. So
when I run the script, Selenium IDE often can’t locate the elements it’s
supposed to “click” to complete the use case.

How do I solve this? Surely, I’m not the only one with this
problem. Is it possible to use a command that just searches for a certain word,
and clicks at the element where it is written? Or is there a command that lets
you automatically unfold the entire treeview?

If anyone could help me with this, I’d be very grateful.

I’m using Selenium IDE 1.8.1 with Firefox 14.0 running on Vista 64bit if that’s any help.

dogbro

Posts : 1
Join date : 2012-07-17

Back to top Go down

Re: Problems using dynamic paths in Selenium IDE

Post by PonAruna on Thu Jul 19, 2012 4:44 am

Hi

when you have an web element with dynamic id you could see that some porting of the dynamic id would be same all the time and only portion of it will change every time the page is loaded newly so find out the portion that is same all the time and

try like this ( for example)

click //*[contains(@id,'ctl00_main_btnIJ')]


in the above mentioned id this "ctl00_main_btnIJ" is same all the time, so take that and check the id contains ctl00_main_btnIJ and use that to click the element

also have a look at this link : http://sauceio.com/index.php/2010/03/selenium-tips-finding-elements-by-their-inner-text-using-contains-a-css-pseudo-class/

PonAruna

Posts : 5
Join date : 2012-07-06

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