Zor*_*ski 5 selenium selenium-webdriver
我有一个Selenium测试,我需要点击"cliclient://"链接,该链接需要打开一个应用程序.现在,我需要为每个测试创建一个新的配置文件,我不知道如何绕过单击链接时出现的"启动应用程序"对话框:
这是我创建的测试片段:
profile = Selenium::WebDriver::Firefox::Profile.new
profile.secure_ssl = false
profile.assume_untrusted_certificate_issuer=true
profile["plugin.default.state"] = 2
profile["plugin.state.java"] = 2
profile["browser.download.folderList"] = 2
profile["browser.download.manager.alertOnEXEOpen"] = false
profile["browser.download.manager.closeWhenDone"] = true
profile["browser.download.manager.focusWhenStarting"] = false
profile["browser.download.manager.showWhenStarting"] = false
profile["browser.helperApps.alwaysAsk.force"] = false
profile["browser.helperApps.neverAsk.saveToDisk"] = 'application/x-msdownload,application/octet-stream, application/x-msdownload, application/exe, application/x-exe, application/dos-exe, vms/exe, application/x-winexe, application/msdos-windows, application/x-msdos-program'
profile["gfx.direct2d.disabled"] = true
profile["layers.acceleration.disabled"] = true
Run Code Online (Sandbox Code Playgroud)
在配置文件中我需要设置什么,绕过对话框,或者在出现此对话框时以某种方式单击"确定"?
小智 1
您还可以尝试使用 SikuliX http://sikulix.com/,这是一款自动化软件,它使用图像来识别需要执行某些操作的 GUI 元素
要将其与 ruby 一起使用,您很可能需要通过系统命令编译和运行 java 类,并且您还需要在执行自动化的计算机上安装 JDK
归档时间: |
|
查看次数: |
403 次 |
最近记录: |