omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.14k stars 103 forks source link

Unresolved attribute reference 'get_attribute' for class 'Element' #124

Closed sdv75 closed 1 month ago

sdv75 commented 1 month ago

header_text = driver.get_text("h1") # Get text content error_message = driver.get_element_containing_text("Error: Invalid input") image_url = driver.select("img.logo").get_attribute("src") # Get attribute value

This code does exception "Unresolved attribute reference 'get_attribute' for class 'Element'"

And method driver.get_attribute(selector, attribute) does not return attribute "value" from tags input or textarea. But the Selenium library returns the attribute "value"

Chetan11-dev commented 1 month ago

Please run the following commands:

python -m pip install bota botasaurus botasaurus_api botasaurus_driver bota botasaurus-proxy-authentication botasaurus_server --upgrade
sdv75 commented 1 month ago

Please run the following commands:

python -m pip install bota botasaurus botasaurus_api botasaurus_driver bota botasaurus-proxy-authentication botasaurus_server --upgrade

I updated and saw a new method get_attribute() in the Element class. But this code: driver.select('textarea[name=title]').get_attribute('value') return None because attribute value does not exist but this code: driver.run_js("return document.querySelector('textarea[name=title]')['value']") return value with title text This value attribute is disappearing somewhere...

Chetan11-dev commented 1 month ago

Resolved, please run python -m pip install bota botasaurus botasaurus_api botasaurus_driver bota botasaurus-proxy-authentication botasaurus_server --upgrade

sdv75 commented 1 month ago

After the update, any search method (select, select_all) is very slow.

Chetan11-dev commented 1 month ago

Share reproducible example, with os and chrome version