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
dogbro
Posts : 1
Join date : 2012-07-17

Problems using dynamic paths in Selenium IDE Empty Problems using dynamic paths in Selenium IDE

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.
avatar
PonAruna
Posts : 5
Join date : 2012-07-06

Problems using dynamic paths in Selenium IDE Empty Re: Problems using dynamic paths in Selenium IDE

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/
Back to top
Permissions in this forum:
You cannot reply to topics in this forum