简体   繁体   中英

Element is detected, but not clicking

I need help. I was able to locate the Element but it is not clicking I had to use action class because .click() method gave me no point element error in selenium.

Teams click = new Teams (driver);
Actions cl = new Actions (driver);
WebDriverWait wait=new WebDriverWait(driver, 20);
WebElement x = click.teamsClick();
x=wait.until(ExpectedConditions.elementToBeClickable(click.teamsClick()));
cl.moveToElement(click.teamsClick()).click().perform();

It can simply work by,

Actions action = new Actions(driver);
action.moveToElement("element name").click().perform(); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM