Reputation: 6785
Page source code below:
<button class="ui-button-primary ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only" type="submit" data-
qa="sidebar.find.submit.button" role="button" aria-disabled="false">
<span class="ui-button-text">Find</span></button>
How do I click this button with Selenium Webdriver and is it possible to click it using the qa=sidebar.find.submit.button
Upvotes: 0
Views: 734
Reputation: 75
And in python, this way :
driver.find_element_by_xpath("//button[@data-qa='sidebar.find.submit.button']")).click();
Upvotes: 0
Reputation: 161
Here you Go
driver.findElement(By.xpath("//button[@data-qa='sidebar.find.submit.button']")).click();
Upvotes: 0
Reputation: 473853
Sure, you can use a CSS selector:
driver.find_element_by_css_selector('button[data-qa="sidebar.find.submit.button"]')
Upvotes: 1