Comments (5)
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.
from webbot.
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
from webbot.
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?
from webbot.
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.
from webbot.
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?
from webbot.
Related Issues (20)
- Premission denied [WinError 5] HOT 1
- Please add functionality to change binary location HOT 1
- cannot find Chrome binary HOT 12
- showWindow documentation incorrect / flipped around
- Error running on AWS lambda.
- How to perform right click using webbot HOT 3
- Webbot is not working on linux(parrot) HOT 3
- Chrome processes stay open after usage HOT 2
- How to change browser to firefox? HOT 3
- where is version 0.1.4 ? HOT 1
- New Issue 2022
- session not created exception: Missing or invalid capabilities HOT 3
- Traceback and cannot find Chrome binary
- Error about Selenium version HOT 1
- Cannot Run In VSCode
- web.go_to('siteurl.com') kills webbot
- switch_to_alert removal in webbot.py
- Incorrect error check?
- Web = Browser() , Error HOT 6
- When I try to do web = Browser() I get this error: ValueError: Timeout value connect was <object object at 0x00000277138947B0>, but it must be an int, float or None. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webbot.