- sm8422
- Posts : 2
Join date : 2011-11-19
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.
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.
- umashankarActive particpant
- Posts : 24
Join date : 2011-11-14
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.
Then try to figure out Xpath (or) CSS , whether it is static and use any one of them.
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
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.
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.
- umashankarActive particpant
- Posts : 24
Join date : 2011-11-14
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..
- Help locating a dynamic locator
- How to find a locator of an element having dynamic ID
- Issuing mouseDownAt(locator, "0,0") & mouseUpAt(locator, "0,0") clicks the Button twice, while issuing mouseDown(locator) and mouseUp(locator) clicks the Button once
- Dynamic Value Capturing
- How to store this dynamic value?
Permissions in this forum:
You cannot reply to topics in this forum