简体   繁体   English

从Selenium会话接管浏览器

[英]Take over browser from selenium session

I'm not sure if there is a term for what I'm trying to do. 我不确定我要做什么。 I currently have a test suite using codeception for a php application. 我目前有一个使用Codeception的php应用程序的测试套件。 What I would like to do is be able to either of the following: 我想做的是能够做到以下之一:

  • watch the browser automation in an actual browser 观看实际浏览器中的浏览器自动化
  • take over the browser at a specific point ( Sort of like a hand over from the script to the browser to allow me to continue to run a session ) 在特定时间接管浏览器(有点像从脚本到浏览器的切换,让我继续运行会话)

Is this possible? 这可能吗? If so what is it called in the selenium documentation 如果是这样,那么硒文档中有什么称呼

a) Selenium runs the actual browser and you can see what it is doing unless you configured Selenium to run some headless browser (but I don't know anything about headless browsers supported by Selenium); a)Selenium运行实际的浏览器,除非您将Selenium配置为运行某些无头浏览器(但我对Selenium支持的无头浏览器一无所知),否则您可以查看其功能。

b) Use Codeception's pauseExecution method to stop execution at specific point. b)使用Codeception的pauseExecution方法在特定点停止执行。

Documentation: 文档:

Pauses test execution in debug mode. 在调试模式下暂停测试执行。 To proceed test press “ENTER” in console. 要进行测试,请在控制台中按“ ENTER”。

This method is useful while writing tests, since it allows you to inspect the current page in the middle of a test case. 该方法在编写测试时很有用,因为它允许您在测试用例的中间检查当前页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM