Selenium can't find button

0 votes

Here is the HTML:

<button id="getCoupon" class="getCoupon" onclick="IWant()" style="" data-i18n="view_prod_get_coupon">Get Your Coupon</button>

I have been trying these ways of finding the button:

1. driver.find_element_by_id('getCoupon').click()
2. driver.find_element_by_xpath('//*[@id="getCoupon"]').click()
3. driver.find_element_by_class_name('getCoupon').click()

None of them seemed to work. Any ideas?

Jan 1 in Selenium by Sebastian
• 180 points

recategorized Jan 1 by Vardhan 176 views

Hey @sebastian, here you can try using 

driver.findElement(By.linkText("Get Your Coupon")).click();
@sebastian did it work?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
1 answer

Python & Selenium: How to find and click on YouTube's Like button

Use the CSS Selector button to like: #watch8-sentiment-actions ...READ MORE

answered Mar 26, 2018 in Selenium by nsv999
• 5,050 points
507 views
0 votes
1 answer

Can't find an element Using Selenium

The reason you can't locate the item ...READ MORE

answered Mar 26, 2018 in Selenium by nsv999
• 5,050 points
247 views
0 votes
3 answers

How to specify "ENTER" button functionality in Selenium WebDriver code?

using OpenQA.Selenium.Interactions; Actions builder = new Actions(driver); ...READ MORE

answered Feb 12 in Selenium by anonymous
6,534 views
0 votes
1 answer
0 votes
1 answer

Python + Selenium - Trying to find element by link containing certain words

2 issues. One thing is, "Catalogues" & ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,050 points
3,257 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8 in Selenium by Anvi
• 10,830 points
89 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
281 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
644 views