尝试在本地触发弹出窗口但不在 GitLab 中,给出 org.openqa.selenium.NoSuchWindowException:浏览上下文已被丢弃

问题描述

我正在测试通过以任何方式(包括切换标签等)将光标移出页面内容而触发的弹出窗口。

在本地,我尝试过切换选项卡、按偏移量移动光标、单击 URL,它们都在本地工作,但我的测试在 GitLab 中失败。

我在尝试按偏移量点击时遇到的错误之一是:

org.openqa.selenium.NoSuchWindowException: browsing context has been discarded
Build info: version: '3.141.59'
java.version: '1.8.0_282'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true,browserName: firefox,browserVersion: 85.0,javascriptEnabled: true,moz:accessibilityChecks: false,moz:buildID: 20210118153634,moz:geckodriverVersion: 0.29.0,moz:headless: false,moz:processID: 75,moz:profile: /tmp/rust_mozprofileTi9Klr,moz:shutdownTimeout: 60000,moz:useNonSpecCompliantPointerOrigin: false,moz:webdriverClick: true,pageLoadStrategy: normal,platform: LINUX,platformName: LINUX,platformVersion: 4.19.0-13-amd64,rotatable: false,setwindowRect: true,strictFileInteractability: false,timeouts: {implicit: 0,pageLoad: 300000,script: 30000},unhandledPromptBehavior: dismiss and notify,webdriver.remote.sessionid: a30a1170-c58e-4aa5-8e2d-5dd...}
Session ID: a30a1170-c58e-4aa5-8e2d-5dd1e56d192e
*** Element info: {Using=id,value=header}

我无法弄清楚如何在不破坏浏览器的情况下触发 gitlab 中的弹出窗口。它也不适用于 Chrome。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...