Skip to content

【Angular】 E2E报错 #146

Description

@deepthan

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();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions