Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Issue with HTML Escape code like

View previous topic View next topic Go down

Issue with HTML Escape code like

Post by hresgil on 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.

hresgil

Posts : 5
Join date : 2011-12-20

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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