Skip to content

Instantly share code, notes, and snippets.

@dstyle0210
Last active July 1, 2019 00:34
Show Gist options
  • Select an option

  • Save dstyle0210/7127883980c55c6adbb41a3219abf66c to your computer and use it in GitHub Desktop.

Select an option

Save dstyle0210/7127883980c55c6adbb41a3219abf66c to your computer and use it in GitHub Desktop.
selenium-webdriver : internet explorer 실행.
// npm install [email protected]
// 셀레니움 오류로, 현재 promise 관련 메소드 (ex : then )가 동작하지 않음. => 과거 버전(3.6.0 을 사용)
var fs = require("fs");
var webdriver = require("selenium-webdriver"),By = webdriver.By,until = webdriver.until;
var capabilities = webdriver.Capabilities.ie();
capabilities.set("unexpectedAlertBehaviour", "accept");
capabilities.set("ignoreProtectedModeSettings", true);
capabilities.set("ignoreZoomSetting", true);
capabilities.set("CapabilityType.ACCEPT_SSL_CERTS", true);
capabilities.set("InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", true);
capabilities.set("nativeEvents", false);
var driver = new webdriver.Builder().withCapabilities(capabilities).build();
// IE11 , selenium-driver 3.6.0 , IEDriverServer_Win32_3.9.0
// driver.manage().window().maximize(); // 성공
// driver.manage().window().minimize(); // 실행전 실패
// driver.manage().window().fullscreen(); // 실행전 실패
// driver.manage().window().setRect(); // 실행전 실패
// driver.manage().window().setRect({height:500,width:700,x:100,y:100}); // 실행전 실패
// driver.manage().window().setSize(1200,1000); // 실행후 실패
// driver.manage().window().setLocation(100,100); // 실행후 실패
// driver.manage().window().getSize(); // 실행후 실패
// driver.manage().window().getPosition(); // 실행후 실패
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment