1

Trying Web.find_elements but it is throwing an error

AttributeError: 'Browser' object has no attribute 'find_elements'

Code

from webbot import Browser
from bs4 import BeautifulSoup
web = Browser()
web.go_to('http://some_link')
web.click(id='link_continue')
print("Login Successful")
web.type('some_value' , into = 'Enter your product name, UPC, EAN, ISBN or ASIN')
web.click(id='a-autoid-0')
web.type('799',tag='input',id='afn-pricing')
web.type('923',tag='input',id='afn-cost-of-goods')
web.click(id='update-fees-link')
web.find_elements(id="afn-selling-fees")[0].get_attribute('outerHTML')

Thanks in advance ...

Sharath
  • 61
  • 11

2 Answers2

1

The issue you're seeing is due to using an old version of webbot; upgrade to the latest version (0.1.4).

find_elements was added in Dec 2018 but your version (0.0.9) is from Jul 2018

Ionut Ticus
  • 2,683
  • 2
  • 17
  • 25
  • Thanks @Ionut Ticus for the quick response, it worked after webbot upgrade.. One more question how i can extract 62.07 value from `
    62.07
    `
    – Sharath May 04 '20 at 13:34
  • You can probably access the underlying Selenium object and use that (`web.driver`). – Ionut Ticus May 04 '20 at 13:48
0

Got the value using text in place of get_attribute('outerHTML') web.find_elements(id="afn-selling-fees")[0].text

Sharath
  • 61
  • 11