python selenium to click a button -


new selenium. trying click "reviews" in below chart. i've tried solutions below got error "message: unable locate element"

    browser = webdriver.firefox(executable_path=r'c:\program files (x86)\mozilla firefox\geckodriver.exe')     url = 'https://www.glassdoor.com/reviews/index.htm'     browser.get(url)     browser.find_element_by_id('keywordsearch').send_keys('google')     browser.find_element_by_id('herosearchbutton').click()     time.sleep(5)     # click review button     # none of below solution working     browser.find_element(by.css_selector, "a.eicell.cell.reviews").click()     browser.find_element(by.css_selector, ".eicell.cell.reviews").click()     browser.find_element_by_xpath('//a[@class="eicell cell reviews" , contains(text(),"reviews")]').click()     browser.find_element_by_xpath('//span[@class="subtle" , contains(text(),"reviews")]').click()     browser.find_element_by_xpath('//span[@class="subtle" , contains(text(),"reviews")]/parent::a').click()     browser.find_element_by_xpath("//a[@class='eicell cell reviews']//span[@class='subtle']").click() 

not getting luck. hope can shed light! enter image description here

because element has multiple classes should use:

browser.find_element(by.css_selector, ".eicell.cell.reviews").click() 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -