nateshmbhat / webbot

Web automation library for simple and easy end to end testing and web browser automation that offers super charged features while keeping it simple to use and master
https://pypi.org/project/webbot/
Mozilla Public License 2.0
239 stars 87 forks source link

How to get text content of an object ? #52

Closed Mglt-b closed 3 years ago

Mglt-b commented 3 years ago

Hello,

How to get text content of an object ?

I try like that :

try to read text

if web.exists(classname='name') == True :

    print('name : ')

    player_name = web.find_elements(classname='name')[0].text

    print(player_name)

`

Thanks for help

issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Mglt-b commented 3 years ago

Ok, it's like that :

a_coins0 = web.driver.find_element_by_class_name('view-navbar-currency-coins').text