[RemoteTestNG] detected TestNG version 7.3.0
1609754675168 geckodriver INFO Listening on 127.0.0.1:123456
1609754675873 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\username\\AppData\\Local\\Temp\\rust_mozprofileomKd1k"
Can't find symbol 'eglSwapBuffersWithDamageEXT'.
Can't find symbol 'eglSetDamageRegionKHR'.
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)"))
1609754679973 Marionette INFO Listening on port 53339
1609754680041 Marionette WARN TLS certificate errors will be ignored for this session
Jan 04, 2021 3:34:40 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
FirefoxDriver: firefox on WINDOWS (f53578b1-71b7-46a7-85ef-8bfd18ba1bc2)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.openxml4j.util.ZipSecureFile$1 (file:/C:/Users/S%20K%M/.m2/repository/org/apache/poi/poi-ooxml/3.17/poi-ooxml-3.17.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of org.apache.poi.openxml4j.util.ZipSecureFile$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
JavaScript warning: https://resulticks.team/Scripts/Commonfunction.js, line 147: unreachable code after return statement
JavaScript warning: https://resulticks.team/Scripts/Commonfunction.js, line 147: unreachable code after return statement
1609754783815 Marionette INFO Stopped listening on port 53339
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.
给定隐式等待时间
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
在 chrome 中工作的相同代码..
对于以下用于启动的 Firefox 代码:
私有同步 ThreadLocal createFirefoxDriver()
{ // FF Profile
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "/driver/geckodriver.exe");
ProfilesIni profile = new ProfilesIni();
FirefoxProfile testprofile = profile.getProfile("Selenium");
FirefoxOptions foptions = new FirefoxOptions();
foptions.setProfile(testprofile);
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("marionatte", false);
foptions.merge(dc);
driver.set(new FirefoxDriver(foptions));
return driver;
}
谢谢@DebanjanB ..我的问题仍然没有解决..使用配置文件运行脚本后
[RemoteTestNG] detected TestNG version 7.3.0
1609825445685 geckodriver INFO Listening on 127.0.0.1:2634
1609825469323 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\SKMAST~1\\AppData\\Local\\Temp\\rust_mozprofileVF0L8V"
Can't find symbol 'eglSwapBuffersWithDamageEXT'.
Can't find symbol 'eglSetDamageRegionKHR'.
1609825472726 Marionette INFO Listening on port 64263
1609825473031 Marionette WARN TLS certificate errors will be ignored for this session
Jan 05, 2021 11:14:33 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
JavaScript warning: https://weburl/Scripts/Commonfunction.js, line 147: unreachable code after return statement
1609825500246 Marionette INFO Stopped listening on port 64263
JavaScript error: https://weburl/DashBoard/Index, line 2521: ReferenceError: LoadingPanelDisplay is not defined
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.
我的问题是
- 在我登录后的应用程序中,尝试在不加载页面元素的情况下查找元素找到消息并捕获屏幕截图。在登录后的另一种情况下,我必须单击元素而不加载页面元素单击消息在几秒钟页面加载后显示。但相同的代码在 chrome 中工作。