Closed NobleFalcon closed 3 years ago
I solved this by accessing the driver element of webbot which have access to the selenium packages that I needed.
So Browser().driver
gave me access to plain selenium modules which allowed me to use the selenium_element.text
Hi, I'm also interested how to convert a found element into text, but I couldn't really figure it out following your instructions.
So
Browser().driver
gave me access to plain selenium modules which allowed me to use theselenium_element.text
Could you please share a code example how you've done it?
Hi, I'm also interested how to convert a found element into text, but I couldn't really figure it out following your instructions.
So
Browser().driver
gave me access to plain selenium modules which allowed me to use theselenium_element.text
Could you please share a code example how you've done it?
Hi @Simplicitus,
There is no documentation about this, I found the solution in the source code. So first I imported the Browser module from webbot from webbot import Browser
. The browser module has access to the selenium web driver module which this API is relying on. Then you can get elements with selenium however you like just follow the Selenium documentation on how to select elements, when the element you want text from is selected you can use the .text
attribute on that element to get the text.
Thanks for your answer @BlackFalcons,
so do I understand correctly that there is no way to transfrom web.find_elements()
to text, but I have to use the Selenium native web.driver.find_element().text
instead?
Yeah @Simplicitus.
As far as I know that is correct, I spent a few hours researching before diving into the source code of the webbot library where I in the end found out how to use plain selenium to this spesific task. I find it inconvenient that a task this simple is not easier to access through the webbot API. I was planning to make a pull request and implement it but I never took the time back then.
Hi there, in my current program I need an option to fetch data from elements on the page while the bot is working as the value is from a timer that is constantly changing, is it possible that you could add that?
Kind regard's BlackFalcons