죄송 원하는 기능을 사용하여 파이어 폭스 바이너리를 설정. Firefox는 AppData 폴더에 설치됩니다. 따라서 나는 나는 파이어 폭스를 사용 셀레늄을 시작하려고</p> <p>... 난 아직 .. 잘 포맷하는 방법을 알아낼하지 않은 끔찍한 서식에 대한
1. Getting below error on - driver.manage().window().maximize();
org.openqa.selenium.WebDriverException: Failed to find width field
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: 'N0610114502', ip: '10.9.21.178', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
2. If I comment out that line and run the program, i get the below error
org.openqa.selenium.InvalidArgumentException:
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: 'N0610114502', ip: '10.9.21.178', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\cc305718\AppData\Local\Temp\rust_mozprofile.sIobxPYVJ8iA, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=XP, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=true, browserVersion=52.5.0, platformVersion=6.1, moz:processID=6712, browserName=firefox, javascriptEnabled=true, platformName=XP}]
Session ID: 030d91eb-9219-43c9-9ade-210005b150b8
내가 잘못에 진을 설정하고이 평균을 하는가 .. 아래의 코드
System.setProperty("webdriver.gecko.driver","C:\\path\\geckodriver.exe");
String pathToBinary = "C:\\Users\\me\\AppData\\Local\\Microsoft\\AppV\\Client\\Integration\\D90C0155-81ED-4977-B52D-E34EAA24FB3C\\Root\\VFS\\ProgramFilesX86\\Mozilla Firefox\\firefox.exe";
ProfilesIni profile = new ProfilesIni();
FirefoxProfile testProfile = new FirefoxProfile();
testProfile.setAcceptUntrustedCertificates(true);
testProfile.setAssumeUntrustedCertificateIssuer(true);
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(FirefoxDriver.PROFILE, testProfile);
dc.setCapability(FirefoxDriver.BINARY, pathToBinary);
driver = new FirefoxDriver(dc);
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
//driver.manage().window().setSize(new Dimension(1920, 1080));
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
System.out.println("beforee driver.get");
driver.get("https://www.google.co.za");
내가 여기에이 문제를 데
를 사용하여 원하는 기능 개체의 이진 경로를 설정하려 방법? 그렇다면 올바른 사용법은 무엇입니까? 당신은 셀레늄을 요구하고 있기 때문에 나는이 당신에게 일어난 생각
org.openqa.selenium.WebDriverException: Failed to find width field
:
난 당신이보고있는 첫 번째 오류를 들어 아래 depricated 방법
FirefoxProfile profile = new FirefoxProfile();
FirefoxBinary binary = new FirefoxBinary(new File("C:\\path to firefox\\firefox.exe"));
driver = new FirefoxDriver(binary, profile);
다음과 같이
는 또한
true
에marionette
기능을 설정해야합니다 당신이 제안한 변화. 작동하지 않는 것 같습니다 ... 지금 아래 오류가 발생했습니다 : launchBrowser org.openqa.selenium.WebDriverException : setWindowRect 빌드 정보 : 버전 : '3.5.3', 개정 : 'a88d25fe6b', 시간 : 2017-08- 더 많은 스택 추적이 필요하면 알려주세요. – Jackranda"아래 오류"라고 말하면 더 이상 첫 번째 오류가 표시되지 않지만 여전히 2 번째 오류가 발생하고 있음을 의미합니까? – AJC24
두 번째가 아닌 ... 여전히 폭에 대해 불평하고 있습니다. – Jackranda