Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Angular】 E2E报错 #146

Open
deepthan opened this issue Sep 17, 2021 · 0 comments
Open

【Angular】 E2E报错 #146

deepthan opened this issue Sep 17, 2021 · 0 comments
Labels

Comments

@deepthan
Copy link
Owner

e2e

1. 报错session not created: This version of ChromeDriver only supports Chrome version 74 error....

session not created: This version of ChromeDriver only supports Chrome version 74 error with ChromeDriver Chrome using Selenium

Chrome版本是77,而protractor的依赖包webdriver-manager版本是低版本匹配的是Chrome版本是74, 因此更新webdriver-manager12.1.7即可解决。

2. 报错Failed: element not interactable

- Failed: element not interactable
        (Session info: chrome=77.0.3865.120)
        (Driver info: chromedriver=77.0.3865.10 (bc3579f611bbc73331171afe020ec7a45e6ccc55-refs/branch-heads/3865@{#93}),platform=Windows NT 10.0.14393 x86_64)

这句话的意思是元素不是可交互的。因为这个元素是获取到了,但是不在浏览器的可视区域(可能在滚动条的另外一边),作为用户是看不到这个元素,所以会报错。

解决办法

把浏览器最大化(或滚动),让元素出现在可是区域。

 browser.driver.manage().window().maximize();
@deepthan deepthan added the E2E label Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant