skip to Main Content

Problem with executing javascript code to do hover event over xpath element in selenium webdriver

I try to trigger hover event over an element declared by xpath statement in selenium webdriver: ((JavascriptExecutor) driver).executeScript("$('(//span[@class='attribute-square-container'])[2]').hover();"); but I'm receiving: org.openqa.selenium.JavascriptException: SyntaxError: missing ) after argument list What is incorrect in above line? I changed code a litle bit:…

VIEW QUESTION

Html – Python selenium: nested element finding

I'm trying to write a function, which returns a list of elements from any level of nesting from the html, containing the word 'products' in its text, case insensitive. here is my function: def __find_elements(driver): return driver.find_elements(By.XPATH, "//*[contains(translate(descendant::text(), " "'ABCDEFGHIJKLMNOPQRSTUVWXYZ',…

VIEW QUESTION
Back To Top
Search