在已经打开的网页上运行测试用例 [英] Running a test case on a webpage that is already open

查看:88
本文介绍了在已经打开的网页上运行测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过量角器运行测试用例,但是由于某些限制,我希望量角器在已经打开的页面上启动,这意味着我不希望驱动程序通过加载chrome并转到其中定义的url来启动测试用例.如果我可以使用已经在屏幕上打开的url,然后使用测试用例中定义的内容(例如单击元素或发送键等)进行进一步处理,有什么办法.

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.

问候 赛义德·扎迪(Syed Zaidy)

Regards Syed Zaidy

推荐答案

硒中未实现此功能.已提出要求,但由于不可行而被拒绝. 如果您在此处阅读问题,然后向下滚动最后发表评论:

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 :

我要打电话给它:这是浏览器的特定功能,不是什么 我们可以以一般方式实施借助IE,可以遍历 在操作系统中打开窗口,然后找到要附加的正确的IE进程.

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和Chrome(OTOH)需要以特定模式启动,并且 配置,这意味着仅附加到正在运行的实例 在技​​术上是不可能的.

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.

这篇关于在已经打开的网页上运行测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆