0

I know that there are similar questions asked about element not clickable issue but for me didn't worked any proposed solution. Mainly I am using Chromedriver and sometimes Geckodriver, this appear on both.

Still getting, Message: unknown error: Element is not clickable at point (470, 1499)

even as you can see I tried with find_element.click() and also with action chains.

More confusing in my case is that part with ("M_1_anchor") pass and part with ("submit") fail, not clickable. Just to add another confusion, same function worked fine till middle of August 2017.

My function is:

from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains

def select_and_click_edit_contact_details(self):
    wait = WebDriverWait(self.driver, 10)
    action = ActionChains(self.driver)
    wait.until(expected_conditions.element_to_be_clickable((By.ID, "M_1_anchor")))
    self.driver.find_element_by_id("M_1_anchor").click()

  action.move_to_element(self.driver.find_element_by_id("submit")).perform()
    action.click(self.driver.find_element_by_id("submit")).perform()
    #self.driver.find_element_by_id("submit").click()

I admit that submit button is not optically visible on page and user need to scroll down but that shouldn't be reason for failing.

    </select></div>
            </div>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="panel-title">
                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#report">
                    Report
                </a>
            </h4>
        </div>
        <div id="report" class="panel-collapse collapse in">
            <div class="panel-body">
                <div class="row">
                    <label class="col-xs-2 col-md-3 control-label">
                        Image file of your logo
                    </label>
                    <div class="col-xs-10 col-md-9">
 <img class="img img-responsive" src="data:image/jpg;base64,/9k=" width="100">                        </div>
                </div>
                    <div class="row" style="margin-top: 20px;">
                        <label class="col-xs-2 col-md-3 control-label">
                            Footer text on driver accounting
                        </label>
                        <div class="col-xs-10 col-md-9">
                            <p class="form-control-static">
                                20
                            </p>
                        </div>
                    </div>
            </div>
        </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a class="accordion-toggle collapsed" data-
      toggle="collapse" data-parent="#accordion" href="#cashbox">
                        Cashbox
                    </a>
                </h4>
            </div>
            <div id="cashbox" class="panel-collapse collapse">
                <div class="panel-body">
                        <p>Currently there are no cashboxes defined!</p>
                </div>
            </div>
        </div>
    <div class="form-group"></div>
    <div class="form-group">
        <label class="control-label col-md-3">
                <input type="submit" id="submit" value="Edit" class="btn btn-primary">
        </label>
    </div>
  </form></div>
   <script type="text/javascript">
   $(function () {
    $("#list option").attr('disabled', true);
    $('.selectpicker').selectpicker(
                                 {
                                     showContent: false
                                 });
      });
   </script>
   </div>
                    </div>
                </div>
            </div>
    </div>
    <div id="push"></div>
 </div>
   <script src="/HaleWebApplication/bundles/DatatablesNewJs?
  v=83AITBTc8vgdDH09rqjGm5-sSopLGkHfDID5YpRCCVs1"></script>
<script src="/HaleWebApplication/bundles/TreeviewJs?
v=p6JgEssUYL1w3zZdiBDt4Ul_VWhmdclj9e1PSoZpKWI1"></script>
13
  • Are you sure the button is visible after move_to_element(#submit)? Commented Sep 29, 2017 at 8:11
  • I am not sure (see attached screenshot). It doesn't work with find_element_by_id or xpath either and it should even is not visible it is on the page. Commented Sep 29, 2017 at 8:21
  • Can you paste the relevant html here? You've attached a screenshot, but how do we associate your problem/code with it? Have you checked if the submit is not disabled when you intend to click it? Commented Sep 29, 2017 at 8:33
  • HTML added to question description Commented Sep 29, 2017 at 8:41
  • when I use this combination without action.click() still the same, that means that action.move step pass. action.move_to_element(#submit).perform() #action.click(self.driver.find_element_by_xpath(xpath)).perform() self.driver.find_element_by_id(#submit).click() Commented Sep 29, 2017 at 8:49

2 Answers 2

1

So at the end solution was to downgrade Chrome version from 61 to 60 and upgrade ChromeDriver from 2.31 to 2.33. it is important to synchronize browser and webdriver versions. Thank all for answers.

Sign up to request clarification or add additional context in comments.

Comments

0

When I put "expected_conditions.element_to_be_clickable" instead of "actionChains_move_to_element" and run it under FF Geckodriver it worked fine. So it is Chromedriver problem or Chrome problem, but I don't know exact where or what is causing that. If someone could help me to identify it and open a bug to Chromedriver, would be much thankful.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.