- hresgil
- Posts : 5
Join date : 2011-12-20
Issue with HTML Escape code like
Mon Feb 13, 2012 7:17 pm
I would be very much obliged if any one can help me with the following issue:
I’m testing a web application with sites on different local languages.
For one of my tests, I have to click on a menu item which I can only access by its description, (it has not a unique id)
selectProvince(String hotelProvince)
selenium.click("css=a:contains('" + hotelProvince + "')");
The menu Item is of following format: ProvinceName + “, “ + countryName
Sometimes either name could be compassed of two or more words.
If in the htlm page, those words are separated by normal space, my test works just fine, but in cases the space has been replaced by this escape code, In this case my test fails as not
Ayia'&'nbsp;Napa, Chipre
(99 hoteles)
For example one of May test looks for a description containing ‘Ayia Napa’
In one site it works just fine as a matching item is found.
But in the another site it fails because the description found is ‘Ayia'&'nbsp;\Napa’ which does not match the expected value. (please remove the ' in front and after &, added just to make scape code visible)
have spent more than a week doing research and trying to figure out how to format the expected value string to match what is on the site’s code, but have been unable to find the right solution.
I would appreciate if someone could help me with a working example.
I’m testing a web application with sites on different local languages.
For one of my tests, I have to click on a menu item which I can only access by its description, (it has not a unique id)
selectProvince(String hotelProvince)
selenium.click("css=a:contains('" + hotelProvince + "')");
The menu Item is of following format: ProvinceName + “, “ + countryName
Sometimes either name could be compassed of two or more words.
If in the htlm page, those words are separated by normal space, my test works just fine, but in cases the space has been replaced by this escape code, In this case my test fails as not
Ayia'&'nbsp;Napa, Chipre
(99 hoteles)
For example one of May test looks for a description containing ‘Ayia Napa’
In one site it works just fine as a matching item is found.
But in the another site it fails because the description found is ‘Ayia'&'nbsp;\Napa’ which does not match the expected value. (please remove the ' in front and after &, added just to make scape code visible)
have spent more than a week doing research and trying to figure out how to format the expected value string to match what is on the site’s code, but have been unable to find the right solution.
I would appreciate if someone could help me with a working example.
- selenium-ant html formatting issue
- my selenium html file opens the code page rather than web page
- In Gmail create account page phone no. field inserting phone no. after the default country code issue
- For every change in the code of selenium RC, Is that necesary to compile the selenium RC code every time.
- HTML in selenium ide
Permissions in this forum:
You cannot reply to topics in this forum