how to search for elements containing unicode/arabic letters?
<p>I am running the below code to find an element containing Unicode Arabic characters. The below code works just fine if I replace XXX with English letter, however, if I replace them with Arabic letters It won't. </p>

<p>I checked the html page and it has "&lt; meta charset="utf-8" >" so I set the character set in my Py script at the first line just to make sure the letters are interpreted as expected but still not working.</p>

<p>Any clue is much appreciate it.</p>

<p>Thanks</p>

<pre><code># coding=UTF8

from selenium import webdriver
# create a new Firefox session
driver = webdriver.Firefox()
driver.implicitly_wait(10)
driver.get("http://www.norikoptic.com/Product/Women")
print driver.find_element_by_xpath(u"//*[contains(text(), 'XXX')]").text
</code></pre>

<p>Try passing Text to be checked in <code>contains</code> (Replacement of 'XXX') from external file system like property file, excel etc. It would work. </p>

<p>Whey there is 'u' before your xpath in the example you have given ? </p>

python selenium xpath unicode