Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Selenium Actions类在不与元素/新鲜元素交互的情况下抛出过时元素错误_Javascript_Selenium_Staleelementreferenceexception - Fatal编程技术网

Javascript Selenium Actions类在不与元素/新鲜元素交互的情况下抛出过时元素错误

Javascript Selenium Actions类在不与元素/新鲜元素交互的情况下抛出过时元素错误,javascript,selenium,staleelementreferenceexception,Javascript,Selenium,Staleelementreferenceexception,以下代码: await actions.move({x: 0, y: 0}).click().perform(); 抛出未处理的PromisejectionWarning:StaleElementReferenceError:stale元素引用:元素未附加到页面文档。当它只移动并单击屏幕上的某个位置时,为什么会抛出一个过时的元素错误?单击时也会发生这种情况。我怎样才能解决这个问题 这,等待操作。移动({x:0,y:0})。单击().perform()。然后(null,(err)=>{retur

以下代码:

await actions.move({x: 0, y: 0}).click().perform();
抛出未处理的PromisejectionWarning:StaleElementReferenceError:stale元素引用:元素未附加到页面文档。当它只移动并单击屏幕上的某个位置时,为什么会抛出一个过时的元素错误?单击
时也会发生这种情况。我怎样才能解决这个问题

这,
等待操作。移动({x:0,y:0})。单击().perform()。然后(null,(err)=>{return err;})
,只停止代码