(硒3.14,FireFox 64.0,Eclipse Photon 4.8.0,Java jdk-10.0.2) 创建测试脚本。它会打开FireFox浏览器,但无论我要打开哪个页面,它始终会打开google.com。任何帮助表示赞赏。
package gov.gamb.rodtests;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class FirefoxTest {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver","C:\\Software Downloads\\Drivers\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("http://seleniumhq.org");
}
}
控制台数据反馈/错误:
1537387613514 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\TERESA~1.LOC\\AppData\\Local\\Temp\\rust_mozprofile.YwDCKs4o92QQ"
[GPU 7284, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[14224, Gecko_IOThread] WARNING: pipe error: 232: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 513
[14224, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
[GPU 2692, Chrome_ChildThread] WARNING: pipe error: 109: file[GFX1-]: GPU process disabled after 2 attempts
[GFX1-]: [D3D11] failed to get compositor device.
[GFX1-]: [D3D11] Failed to init compositor with reason: FEATURE_FAILURE_D3D11_NO_DEVICE
[GFX1-]: Could not get a DXGI adapter
[GFX1-]: Could not get a DXGI adapter
[GFX1-]: [D3D11] failed to get compositor device.
[GFX1-]: [D3D11] Failed to init compositor with reason: FEATURE_FAILURE_D3D11_NO_DEVICE
[GFX1-]: Could not get a DXGI adapter
IPDL protocol Error: Received an invalid file descriptor
IPDL protocol Error: Received an invalid file descriptor
IPDL protocol Error: Received an invalid file descriptor
IPDL protocol Error: Received an invalid file descriptor
IPDL protocol Error: Received an invalid file descriptor
1537387616407 Marionette INFO Listening on port 64739
1537387616806 Marionette WARN TLS certificate errors will be ignored for this session
1537387616879 Marionette DEBUG [6442450945] Frame script loaded
1537387616893 Marionette DEBUG [6442450945] Frame script registered
Sep 19, 2018 4:06:56 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1537387617035 Marionette DEBUG [6442450945] Received DOM event beforeunload for about:blank
1537387618516 Marionette DEBUG [6442450945] Received DOM event pagehide for about:blank
1537387618729 Marionette DEBUG [6442450945] Received DOM event DOMContentLoaded for https://www.google.com/?gws_rd=ssl
1537387620916 Marionette DEBUG [6442450945] Received DOM event pageshow for https://www.google.com/?gws_rd=ssl