cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
47.54k stars 3.2k forks source link

CypressError: Timed out retrying, Expected to find element, but never found it. #5910

Closed mingyixu closed 4 years ago

mingyixu commented 4 years ago

Current behavior:

develope console on Chrome 78 , can find this li.span and only element. but use cypress run test, can not find this element, before this command wait 2 second, also the same result.

why not find this element ? you can retry it use nth-child on chrome console.

document.querySelector('div:nth-child(28) > div.el-scrollbar > div.el-scrollbar__wrap > ul.el-select-dropdown__list > li:nth-child(1)')
<li class=​"el-select-dropdown__item selected hover" data-spm-anchor-id=​"5176.edas_createappnew.0.i4.320d1b69rpdIhW">​<span>​autotesthz​</span>​</li>​
 CypressError: Timed out retrying: Expected to find element: 'div:nth-child(30) > div.el-scrollbar > div.el-scrollbar__wrap > ul.el-select-dropdown__list > li:nth-child(1)', but never found it.
      at Object.cypressErr (https://passport.aliyun.com/__cypress/runner/cypress_runner.js:105262:11)
      at Object.throwErr (https://passport.aliyun.com/__cypress/runner/cypress_runner.js:105217:18)
      at Object.throwErrByPath (https://passport.aliyun.com/__cypress/runner/cypress_runner.js:105249:17)
      at retry (https://passport.aliyun.com/__cypress/runner/cypress_runner.js:96526:16)
      at onFailFn (https://passport.aliyun.com/__cypress/runner/cypress_runner.js:85591:16)

Desired behavior:

Steps to reproduce: (app code and test code)

Versions

Desired behavior:

Steps to reproduce: (app code and test code)

Versions

darilok commented 4 years ago

Heja Mam problem z huawei P20L.Widze że sam tego nie ogarne. Miesiąc prub i lipa.Jak by ktoś kumaty miał chwile to wdzięczny bym był. 🤔. Dzięki i pozdro dla wszystkich. Problem mam taki że zablokowane chyba mam sms oraz telll. Tak podejrzewam bo gdy miałem giffgafa to net miałem.Teraz zmieniłem na laikre i całkiem nic.APN różne juz próbowałem i lipa. Jak włóże giffgafa karte to to telefon widzi ale mam wtedy tylko internet.Mialem wlam z PayPal i dlatego myślę że to ktos od nich coś zrobil.A tel... praktycznie nowy jest. Dzieki.

jennifer-shehane commented 4 years ago

When opening an issue, please fill out the entire issue template provided - it requires necessary information we need to help you, like desired behavior, a reproducible example (test code especially) and the version of Cypress you are using.

This issue will be closed as per our contributing guidelines. Please comment in this issue with the required information from our issue template and we will reopen the issue. 🙏