1
I’m looking for an element, and so far so good, I’ve tested it again and again, but.. by using this code
driver.find_element_by_xpath('//*[@data-qtip="Configurações"]').click()
gives an error, and the cmd returns me
File "chrome.py", line 105, in tearDown
driver.find_element_by_xpath('//*[@data-qtip="Configura├º├Áes"]').click()
clearly he is not finding why he is disfigured the "settings"
that same element, works normally
driver.find_element_by_xpath('//*[@data-qtip="Sem descrição."]').click()
added to the code
#!/usr/bin/env python
# -*- coding: utf-8 -*-
however the problem persists, how to proceed?
Try to put it like this:
r'//*[@data-qtip="Configurações"]'
, understand ther
before the string. Or else it isu
, I’m trying to remember.– Math
still continues, what would be the function of r?
– Guilherme Lima
Ah no, the
r
is to disregard the\
as a special character, like\n
for new line or\t
for TAB. Tried with theu
? I’m researching here right now. I’ve been through it but I can’t reproduce it now.– Math
https://docs.python.org/2/tutorial/introduction.html#Unicode-strings
– Math
u also did not work, funny that above use the same xpath with the field "No Description" and works perfectly,
– Guilherme Lima
I could show you how the stretch that worked?
– Math
driver.find_element_by_xpath('//*[@data-Qtip="No description."]'). click()
– Guilherme Lima