0

I am using Selenium to cover a test where a user should click ok each link wait till the page is loaded and that goes back to perform the same action to other elements.Problem is that it works for first 3 elements which are visible on the page but for the rest it fails. I've tried a different combination of ActionChains, send_keys Keys_SPACE, but no luck. Certainly, I am doing something wrong but have no idea what else to try

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC, expected_conditions

from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
from selenium.webdriver.support.wait import WebDriverWait


class Video003(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(30)
        self.base_url = "https://www.hydroshare.org/"
        self.verificationErrors = []
        self.accept_next_alert = True

def test_180320_video003(self):
    driver = self.driver
    driver.get(self.base_url + "/")
    driver.find_element_by_link_text("HELP").click()
    support_links = driver.find_elements_by_css_selector(".topic-name>div")
    links_text = []
    for l in support_links:
        links_text.append(l.text)
    for link in links_text:
        elem = driver.find_element_by_xpath("//div[contains(text(),\"{}\")]".format(link))
        elem.location_once_scrolled_into_view
        elem.click()

        WebDriverWait(driver, 4).until(
            expected_conditions.text_to_be_present_in_element(
                (By.CSS_SELECTOR, "#breadcrumb-menu-home>a"),
                "HydroShare Support"
            )
        )
        driver.back()
  • Possible duplicate of [Element MyElement is not clickable at point (x, y)... Other element would receive the click](https://stackoverflow.com/questions/44724185/element-myelement-is-not-clickable-at-point-x-y-other-element-would-receiv) – undetected Selenium Mar 21 '18 at 13:51
  • 1
    share the failure stacktrace . Without that , there are only opinionated answers. – Manmohan_singh Mar 21 '18 at 14:07
  • selenium.common.exceptions.WebDriverException: Message: Element is not clickable at point (371.5, 11.600006103515625). Other element would receive the click: – Serge Soloshchenko Mar 21 '18 at 14:12

0 Answers0