Share
Go down
sm8422
Posts : 2
Join date : 2011-11-19

Help PLZ.....Dynamic locator

on 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.
umashankar
Active particpant
Active particpant
Posts : 24
Join date : 2011-11-14

Re: Help PLZ.....Dynamic locator

on 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.
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Help PLZ.....Dynamic locator

on 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.
umashankar
Active particpant
Active particpant
Posts : 24
Join date : 2011-11-14

Re: Help PLZ.....Dynamic locator

on 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

Re: Help PLZ.....Dynamic locator

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