Laravel dusk,Facebook \ WebDriver \ Exception \ StaleElementReferenceException:陈旧元素引用:元素未附加到页面文档

时间:2017-10-03 13:56:13

标签: laravel selenium-webdriver

这是我使用过的代码,但我得到了"元素没有附加到页面文档"错误

$browser->visit('/')
                      ->click('.fa-envelope')
                      ->assertSee("Mailbox")
                      ->click('.btn-info')
                      ->pause(3000)
                      ->click('.multiselect__select')
                      ->click('.multiselect__element:nth-child(2)')
                      ->click('.multiselect__element:nth-child(1)')
                      ->click('.multiselect__select')
                      ->pause(3000)
                      ->click('#app > div > aside.right-side.right-padding > div > div > section > div > div.col-sm-8.col-md-8 > section > div > div > form > div:nth-child(3) > div > div.multiselect__tags > input')
                      ->pause(3000)
                      ->element('#app > div > aside.right-side.right-padding > div > div > section > div > div.col-sm-8.col-md-8 > section > div > div > form > div:nth-child(3) > div > ul > li:nth-child(2) > span > span')->click()
                      // ->driver->executeScript('window.scrollTo(0, 170);');
                      // $browser
                      ->click('.btn-info');

0 个答案:

没有答案