我发现 RHEL 的问题完全相同:(我的问题是针对 Windows) 仅安装 mongo shell,而不是 mongodb
是否有 Windows 等价物:mongodb-org-shell
我可以从另一台 Windows 机器上的服务器安装中复制 mongo.exe 吗?
我正在尝试使用WebDriver来自动化网站.我正在使用Firefox驱动程序,但主页有一个弹出模式警报窗口:说:
您需要使用IE 6.0来查看此应用程序.否则一些功能可能无法正常工作我检查了页面的来源,它有一个功能.模态警报不是HTML元素,我尝试使用FireBug查找任何元素,但无济于事.
if ( strBrowName == "Microsoft Internet Explorer" )
{
if ( (( strBrowVersion.indexOf( 'MSIE 6' ) ) > 0 ) )
{
}
else
{
alert( "You need to use IE 6.0 for viewing this application. Else some features may not work" );
}
Run Code Online (Sandbox Code Playgroud)
在我的WebDriver代码中,我在驱动程序中使用了以下功能(如其他帖子所示)
DesiredCapabilities dc=new DesiredCapabilities();
dc.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,UnexpectedAlertBehaviour.ACCEPT);
WebDriver driver =new FirefoxDriver(dc);
Run Code Online (Sandbox Code Playgroud)
然后我正在进行一个简单的get调用,包含在try-catch中:
try {
driver.get(B);
}
catch (UnhandledAlertException e) {
System.err.println("Caught UnhandledAlertException: ");
}
System.out.println("URL Opened");
Run Code Online (Sandbox Code Playgroud)
如果我不在驱动程序对象上写任何方法并关闭驱动程序.该程序通常在Eclipse中终止,但Modal Alert保持打开状态,尽管:
UnexpectedAlertBehaviour.ACCEPT
Run Code Online (Sandbox Code Playgroud)
但是,如果我使用任何与驱动程序相关的方法或操作,就像getTitle一样简单:
String title = driver.getTitle();
Run Code Online (Sandbox Code Playgroud)
Java代码因异常而失败,但模式警报弹出窗口关闭!并且错误的最后一个行号作为我使用第一个驱动程序相关操作的行给出. …