简体   繁体   English

当通过fitnesse wiki运行测试时,如何在前台/ ontop中运行chrome实例

[英]How to bring running chrome instance in foreground/ontop when test is run through fitnesse wiki

I have different selenium tests created on my fitnesse wiki. 我在fitnesse维基上创建了不同的硒测试。 Fitnesse wiki is opened in a chrome browser. Fitnesse wiki在Chrome浏览器中打开。 Now, When I hit on Test to run a particular test on fitnesse wiki, it opens a new chrome instance and runs tests there. 现在,当我点击Test以在fitnesse wiki上运行特定测试时,它会打开一个新的chrome实例并在那里运行测试。 The problem is that the new chrome instance opens in background and I can not see the execution unless I manually click the running chrome instance to bring it to foreground. 问题是新的chrome实例在后台打开,除非我手动点击正在运行的chrome实例将其置于前台,否则我无法看到执行。 My requirement is that whenever a new instance opened, it should get opened in foreground/OnTop without any manual intervention. 我的要求是每当打开一个新实例时,它应该在前台/ OnTop中打开而无需任何人工干预。 How can I achieve this using selenium C#. 如何使用selenium C#实现这一目标。 Any help will be very much appreciated. 任何帮助将非常感谢。

Since Chrome was opened by Selenium, you should have access to that window . 由于Chrome是由Selenium打开的,因此您应该可以访问该窗口

Try to maximize the window: 尝试最大化窗口:

driver.Manage().Window.Maximize();

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

相关问题 C#控制台应用程序将进程带到前台 - C# console application bring process to foreground 执行测试时启动多个浏览器实例 - Multiple browser instance launch when i execute my test 如何在C#中将鼠标悬停时设置Windows应用程序ToolstripMenuItems文本前景颜色更改 - How to set Windows application ToolstripMenuItems Text Foreground Color Change When Hover Mouse in C# 如何在VS中运行和测试Windows服务 - How To Run And Test a Windows Services In VS 如何将今天/当前日期从Fitnesse Table单元格传递到C#夹具 - How to Pass Todays/Current date from Fitnesse Table Cell to C# fixture wpf Treeview CheckBox项ForeGround颜色在禁用时无法更改? - wpf Treeview CheckBox Item ForeGround Color cannot Change when it is disabled? 如何只运行一个具有3.5 .NET Framework和CE Windows 5.0的exe实例 - How to have just ONE instance running of an exe with 3.5 .NET framework and CE windows 5.0 GC.KeepAlive()取消注释时,仍然只有一个实例,怎么办? - GC.KeepAlive() when this is uncommented, still there is only one instance, how ? 通过C#运行时从命令行获取GCC的输出 - Getting GCC's output from command line when running it through C# 如何在不重启服务器的情况下添加带有触发器的作业来运行Quartz.NET调度程序实例? - How to add job with trigger for running Quartz.NET scheduler instance without restarting server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM