Running a test case on a webpage that is already open

旧城冷巷雨未停 提交于 2019-12-04 06:32:35

问题


I want to run my test cases via protractor, but due to some limitation I want protractor to start on a page that is already open, meaning I don't want driver to start by loading chrome and going to the url defined in test case. Is there any way if I can use the url that is already opened on screen and then process further with what is defined in the test case such as clicking on elements or sending keys etc.

Regards Syed Zaidy


回答1:


This feature is not implemented in selenium. It was requested but rejected because it is not feasible. If you read the issue here, and scroll down to last comment :

I'm going to make a call on this one: it's a browser specific feature, and not something that we can implement in a general way. With IE, it's possible to iterate over the open windows in the OS and find the right IE process to attach to.

Firefox and Chrome, OTOH, need to be started in a specific mode and configuration, which means that just attaching to a running instance isn't technically possible.

Closing as "not feasible" here as this is a browser specific feature.



来源:https://stackoverflow.com/questions/42066902/running-a-test-case-on-a-webpage-that-is-already-open

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!