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 in Selenium by Jino
• 5,560 points
207 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 by Dushyant

Related Questions In Selenium

0 votes
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,130 points
927 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,130 points
7,965 views
0 votes
1 answer
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,110 points
931 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
1,114 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
855 views
+2 votes
1 answer
0 votes
1 answer