I am trying to parse some sites and have faced a problem with finding an element with xpath.
Do you know if there could be problems if the text you want to specify in xpath is not in English but e.g. in Russian?
let's say i want to find by such xpath
//*input[@value="text in Russian"]
Do I need to decode something or it is supposed to work and I need to solve the other problem??
update
It doesn't work even with explicit declaring like
'//*input[@value="%s"]' % u'text in Russian'
I will keep looking for other reasons.
Thx to all
So, my problem was not with decoding but with specifying the full xpath to the element.
I spotted that for pages with complex structure partial xpath work not so good and not always.
In my case it is like:
//form[@id="basket-form"]/div/div[@class="content-top-secondary-section"]/div/div/div[@data-id="price-summary"]/div/div/input[@value="text in Russian"]
Intead of initial simple declaration of the last part
//input[@value="text in Russian"]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments