Skip to content
Advertisement

Tag: selenium-webdriver

locate an a element and click on it in selenium pyhton

I have this page and I want to click on the a element that sends an email(the one that is highlighted in the screenshot below and I have tried to find this element using By.XPATH email = driver.find_element(By.XPATH, “//a[contains(@class, ’email-old-32′)]”).click() and By.CLASS_NAME email = driver.find_element(By.CLASS_NAME, ’email-old-32′).click() and in both situations i’m getting an error no such element, does anyone know

clicking on hyperlink using xpath and css selector do not work

I would like Selenium driver to click on the export button as shown in the image. Here is the html code: I tried: from the suggestion here driver.find_element(by=By.XPATH(“//a[@href=’/index.php/filter/export/f/KbInvoiceFilter/m/kb_invoice/a/list’]”)).click(); but it returns str is not callable. Then, I tried using CSS_SELECTOR based on docs here: it returns NoSuchElementException Answer Try with below OR Add the ExplicitWait

Advertisement