Python Selenium search for [object Text] -


this selenium code below.

sourcesearch = driver.find_element_by_xpath('//*[@id=\"table_exame\"]/tbody/tr[1]/td/text()[1]') 

and result -

selenium.common.exceptions.invalidselectorexception: message: invalid selector: result of xpath expression "//*[@id="table_exame"]/tbody/tr[1]/td/text()[1]" is: [object text]. should element.

would there ways can retrieve [object text] via selenium? kind of appreciated.

anything other xpath weren't available since site did not add tags text. also, sorry not being able include site address since it's member website.

as xpath expression terminates text()[whatever], resolves text container, , not html element (or list of).

hint: try xpath expression in firefox console $x(some_xpath_expression) while browsing page.

perhaps should edit question , add surrounding html excerpt , describe precisely expect.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -