Display results as :

Rechercher Advanced Search

Latest topics
» Selenium WebDriver Integration
Today at 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce


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)"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.


Posts : 5
Join date : 2011-12-20

Back to top Go down

View previous topic View next topic Back to top

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