Cannot click on a button using selenium

0 votes

I am using flipkart as my testing website and trying to click on View All button that comes at the bottom section of Offers.

I am trying to click the button but I am getting the error:-

is not clickable at point (518, 507)

Can someone help me with this?

Jan 4, 2019 in Selenium by Jino
• 5,810 points
3,211 views

1 answer to this question.

0 votes

The error that I figured out was that the button is not there in your screen. You need to scroll down and then wait for the button and then try to click it. 

Here is how you can scroll down and then try clicking on the required button:-

from selenium.webdriver.common.keys import Keys

for reply in driver.find_elements_by_xpath('//div[starts-with(@id, "View All")]/a'):
    driver.execute_script('arguments[0].scrollIntoView();', reply)
    reply.send_keys(Keys.DOWN)
    reply.click()

This way you can scroll till the button and then click on it.

answered Jan 4, 2019 by Dushyant

Related Questions In Selenium

+1 vote
1 answer

Angular JS: Selenium cannot click a button by python code on mac

You can try clicking it with javascript ...READ MORE

answered Aug 9, 2018 in Selenium by Samarpit
• 5,910 points
4,812 views
0 votes
1 answer

Click on a button within a pop-up window with python selenium

It's not an Alert but a Modal Dialog Box. You ...READ MORE

answered Jun 20, 2018 in Selenium by Samarpit
• 5,910 points
31,010 views
0 votes
2 answers

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,500 points
12,718 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,612 views
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,910 points
6,685 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,554 views
+2 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP