Issue
Fist of all here is the picture of the HTML code:
This is the element I tried to access:
I tried: driver.find_element_by_class_name("btn_green_white_innerfade btn_medium market_commodity_buy_button")
I would be glad for any help!
Regards
-Eirik
Solution
In Selenium, class name do not have support for spaces. Please remove spaces and put .
instead to make a css_selector
.
Instead of
driver.find_element_by_class_name("btn_green_white_innerfade btn_medium market_commodity_buy_button")
do this :
driver.find_element_by_css_selector("a.btn_green_white_innerfade.btn_medium.market_commodity_buy_button")
Answered By - cruisepandey
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.