What I am trying:
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
WebElement element = driver.findElement(By.xpath("//span[text()='TrailVersion, Testing_Demo']"));
Option 1:
element.click();
Option 2:
Actions action = new Actions(driver);
action.click(element).build().perform();
action.moveToElement(element).click().build().perform();
{Giving exception "org.openqa.selenium.JavascriptException: javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite." }
Option 3:
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);
I would like to highlight that span tag contains attribute <span unselectable = "on">
I have tried all the above 3 options but unfortunately, nothing is working. I have tried different Xpath's for the same element too but in vain. The element has no unique ID or class.
Can anyone please help me resolve the issue?