我正在尝试通过 Jenkins 在没有 GUI 的 Ubunt 服务器 16.04 上运行我的 selenium 脚本。
在打开网页之前,它需要进行 Windows 身份验证。我使用 AutoIT 为 Windows 创建,它运行良好,但现在我必须通过 Jenkins 在 Ubunt 服务器上执行,并收到以下错误:
Using deprecated data structure for setting timeouts
java.io.IOException: Cannot run program "/usr/share/GlobalStagingERP/global.staging.erp/authentification/WindowsAuthenticationFireFoxCodeExample.exe": error=13, Permission denied
我决定用 python 和 SciTE 来做。
我还尝试了“ https://username:password@my_url/ ”,但它没有用并出现致命错误。
这是我如何使用 AutoIT 脚本在窗口中处理身份验证的示例:
WinWaitActive("Authentication Required","")
MouseClick("left",331, 288,1)
Send("username")
Send("{TAB}")
Send("password")
Send("{ENTER}")
但是如何使用 python 在 SciTE 中执行相同的操作?