Using Xpath when you have new line text

Here is an example where there are new lines and have to validate if the exact text is displayed in the correct order using xpath. User-agent: * Disallow: /clickthrough.html Disallow: /details.html Disallow: /post-sendtofriend.html Use normalize-space(), which will throw away the leading and trailing whitespace characters (and condense repeating spaces in the middle of the text […]

Using regular expression in Selenium

Here is the xpath I want to use regular expression. Code with out using regular expression: Assert.IsTrue(selenium.IsElementPresent(“ctl00_5hh5_g5656_675gffg042f_tbSearch”)); Code using regular expression: Assert.assertTrue(selenium.isElementPresent(“css=input[id$=’tbSearch’]”)); Alternative is to use contains in the xpath. Here is the example: //input[contains(@id,’tbSearch’)]

Selenium RC Error – SeleniumException: XHR ERROR

When running the selenium script of a website I got the following error com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://www.website.com.au/ Response_Code = 400 Error_Message = Bad Request. The solution was pretty simple. Instead of using the url http://www.website.com.au/ change it to http://website.com.au/. Remove the www. The reason オンライン カジノ is because there is no 301 re-direct […]