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
sm8422
Posts : 2
Join date : 2011-11-19

Help PLZ.....Dynamic locator Empty Help PLZ.....Dynamic locator

Sat Nov 19, 2011 6:12 am
Hi,

Here is my situation. I am testing a web application.
After recording my script with selenium IDE. the developer made changes to the application.
So when i ran my script looks like most of the fields to enter text cannot be found.
For example:
The recorded scrip has an
id=j121 ...this field used to enter first name.
another id=j122 used to enter last name
another id=j123 used to enter student id number

after the modification by developer the id changed
to id=j120 is for first name
id=j121 last name
id=j122 student id number.


now when i run the script it does not finds first name field. then it enters last name into first name field and student id into last name field.

how can i fix this without going into my script and modify the whole script with the new id?
it is really tough when you have about 20 fields in a page.

some one please help me with this.
I am using python and selenium IDE.
avatar
umashankar
Active particpant
Active particpant
Posts : 24
Join date : 2011-11-14

Help PLZ.....Dynamic locator Empty Re: Help PLZ.....Dynamic locator

Mon Nov 21, 2011 11:55 am
Hi,

Then try to figure out Xpath (or) CSS , whether it is static and use any one of them.
avatar
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Help PLZ.....Dynamic locator Empty Re: Help PLZ.....Dynamic locator

Mon Nov 21, 2011 5:45 pm
It is the biggest inconvenience of testing... When something is changed, you have to rewrite your test script.
You don't have absolutely certain that xPath or CSS will not be changed. In fact, you can't write script for all possibilities. You just have to change manually your script when there are any changes in app.
avatar
umashankar
Active particpant
Active particpant
Posts : 24
Join date : 2011-11-14

Help PLZ.....Dynamic locator Empty Re: Help PLZ.....Dynamic locator

Mon Nov 21, 2011 6:32 pm
Yeah you are correct faramka... So if it strict that developer should code in such a way that in the page atleast one property should be unique for all the elements, then it will be very easy to Automate.. Just am telling about my opinion..
Sponsored content

Help PLZ.....Dynamic locator Empty Re: Help PLZ.....Dynamic locator

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