thanks for the help i now can do print property.text without problems
dude-x
zuiss1 honestly i am surprised that even worked
because find_elements should return a list object not a string
lucast
he used find_element in that one
zuiss1
i removed the text.encode(utf-8') from the for line
dude-x
also by default, all strings that are returned as "WebElement.text" is a utf-8 unicode string
lucast
oh nm no he didnt
AnarchyAo has quit
ahh he had a [3] before .text.encode
dude-x
lucast s/he may be modding the code again
lucast
hard to read minds
;)
dude-x
i've been guilty of doing that too
i will say "i'm doing x.y.z"
lucast
probably because of all those tabs you keep open in your browser
dude-x
but then after closer inspection I am doing something silly like "x.y.z.x"
and then i realize, oh i'm doing something silly :p
lucast
im pretty bad at explaining things too, i leave out critical info
because i think it in my head and then skip it in the actual words
dude-x
usually when something violates expectations of how the code should work, odds are you have a bug in your code
dimacus1 joined the channel
dimacus has quit
liuedx has quit
liuedx joined the channel
tyang_ has quit
Luffha has quit
Luffha joined the channel
tony3 has quit
Luffha has quit
FoxLeo joined the channel
nirvdrum joined the channel
jroc78 joined the channel
dimacus1 has quit
FoxLeo has left the channel
FoxLeo joined the channel
FoxLeo
I'm using CSV Read Selenium-IDE.js but I get error reading this character "í" and also "ú" know how I fix it?
slackbot3
<titusfortner> :ide
selbot2
Selenium IDE is no longer being maintained. You can ask a question, but most people here will be unable to help you. Instead, consider using WebDriver - http://www.seleniumhq.org/projects/webdriver/
FoxLeo
I'll read over WebDriver
jroc78 has quit
dimacus1 joined the channel
FoxLeo has quit
zuiss1
when i do: for x in driver.find_element_by_css_selector(".col-xs-2.text-right"): print x[1] i get an error 'WebElement' object does not support indexing
so i changed elements to element and i get 'WebElement' object is not iterable
what should i do?
AnarchyAo joined the channel
errant_rider has quit
lucast
you are trying to iterate over an object
you are probably wanting to use driver.find_elements_by_css_selector
Luffha joined the channel
dude-x
zuiss1 when you find an element, it returns a WebElement object
if you call find elementS <-- note the S. it returns a list. It's a list of WebElements
zuiss1
yea that's what i gathered when i did some searching for the error i was getting
dude-x
once you have a web element, then you call it's methods, like .text or get_attribute('')
zuiss1
so i tried it without the s
lucast
even if you did it WITH the s it wouldnt work
due to the print x[1]
dude-x
find_element returns a single element, find_elements returns a Python list (of web elements)
lucast
sorry i'm probably confusing you, listen to dude-x
fabrice31 has quit
dude-x
to use indexing: you would have to write: elements = driver.find_elements_by_css_selector('...'); elements[1].text