0

I am using selenium to test the UI of my web page. I am using py.test. This is my code:

def test_author_create_typehead(selenium, small_app):
    selenium.get(os.environ['SERVER_NAME'] + '/submit/author/create')
    institution = selenium.find_element_by_id('institution_history-0-name')
    institution.send_keys('cer')
    selenium.find_element_by_css_selector("div.tt-suggestion").click()
    assert 'CERN' in institution

Everything seems to work anyway this line throws an error:

Element is not clickable at point (409.5, 33.600006103515625). 
Other element would receive the click: <a href="" id="tools-dropdown"
class="dropdown-toggle" type="button" data-toggle="dropdown" 
aria-haspopup="true" aria-expanded="true"></a>

This is the screen that selenium has reported:

Detail

As you can see the navbar is covering the element that I want to click. Do you have any idea about how to solve this problem? Or if there is a way to scroll the page with python.

Thanks in advance!

  • Seems this is a bug in the software. What have you tried? Have you seen http://stackoverflow.com/questions/20986631/how-can-i-scroll-a-web-page-using-selenium-webdriver-in-python ? – lauda Sep 14 '16 at 08:02
  • Is there any logic to the nav bar floating into that position? Does it happen when you are manually running the test. If this is not an acceptable behaviour, you got to ask the developers to fix the navigation bar floating all over the place. – Grasshopper Sep 14 '16 at 08:05

0 Answers0