Giter Site home page Giter Site logo

Comments (5)

NobleFalcon avatar NobleFalcon commented on August 16, 2024 1

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.

NobleFalcon avatar NobleFalcon commented on August 16, 2024

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.

AronHegedues avatar AronHegedues commented on August 16, 2024

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 the selenium_element.text

Could you please share a code example how you've done it?

from webbot.

NobleFalcon avatar NobleFalcon commented on August 16, 2024

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 the selenium_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.

AronHegedues avatar AronHegedues commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.