selenium-grid - RIP Tutorial · 2019. 1. 18. · from: selenium-grid It is an unofficial and free...
Transcript of selenium-grid - RIP Tutorial · 2019. 1. 18. · from: selenium-grid It is an unofficial and free...
-
selenium-grid
#selenium-
grid
-
1
1: Selenium-Grid 2
2
Examples 2
Selenium Grid ? 2
? 2
2: 3
3
3
h11 3
3
3
Examples 3
3
3
4
6
Json 6
C # 8
8
Microsoft Edge 8
8
Firefox 9
9
Json C # 10
10
Microsoft Edge 10
10
Firefox 11
11
13
-
You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: selenium-grid
It is an unofficial and free selenium-grid ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official selenium-grid.
The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.
Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to [email protected]
https://riptutorial.com/ko/home 1
http://riptutorial.com/ebook/selenium-gridhttps://archive.org/details/documentation-dump.7zmailto:[email protected]
-
1: Selenium-Grid .
. .
Examples
Selenium Grid ?
Selenium-Grid Hub & Node . , . , Selenium Grid .
?
, . -OS .•. 8 8 .•
Selenium-Grid .
?
/ .•.•.•.•
().•. n .•OS .•Hub Machine / .•
Selenium-Grid : https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-
https://riptutorial.com/ko/home 2
https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0https://riptutorial.com/ko/selenium-grid/topic/8701/selenium-grid-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0
-
2:
webdrivers .
.
Chrome •FireFox •Microsoft Edge •
•
••
Microsoft Edge••
Examples
Selenium Java .
stable Selenium Server .•Selenium jar .•: ( : .) java -jar selenium-server-standalone-2.53.0.jar -role hub•:•
selenium webserver . 4444 (FYI - -port ).
•
https://riptutorial.com/ko/home 3
https://sites.google.com/a/chromium.org/chromedriver/downloadshttps://sites.google.com/a/chromium.org/chromedriver/downloadshttps://sites.google.com/a/chromium.org/chromedriver/downloadshttps://sites.google.com/a/chromium.org/chromedriver/downloadshttps://sites.google.com/a/chromium.org/chromedriver/downloadshttps://github.com/mozilla/geckodriver/releaseshttps://github.com/mozilla/geckodriver/releaseshttps://github.com/mozilla/geckodriver/releaseshttps://github.com/mozilla/geckodriver/releaseshttps://github.com/mozilla/geckodriver/releaseshttps://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/https://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://github.com/operasoftware/operachromiumdriver/releaseshttps://www.google.com/chrome/browser/desktop/index.htmlhttps://www.google.com/chrome/browser/desktop/index.htmlhttps://www.mozilla.org/nl/firefox/new/https://www.mozilla.org/nl/firefox/new/https://www.mozilla.org/nl/firefox/new/https://www.mozilla.org/nl/firefox/new/https://www.mozilla.org/nl/firefox/new/https://www.microsoft.com/nl-nl/windows/microsoft-edgehttp://www.opera.com/nlhttp://www.opera.com/nlhttp://www.opera.com/nlhttp://selenium-release.storage.googleapis.com/index.htmlhttps://i.stack.imgur.com/q1nSC.png
-
http : // localhost : 4444 / grid / console ..•
, .
Selenium Server for Hub .•Selenium-server jar jar cmd .•. java -jar selenium-server-standalone-2.53.0.jar -role node -hub http : // hubIP : 4444 / grid / register
hubIP : - ○localhost : - ○
•
. -port 5555 -port .
https://riptutorial.com/ko/home 4
http://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttp://localhost:4444/grid/consolehttps://i.stack.imgur.com/2iSdv.pnghttp://selenium-release.storage.googleapis.com/index.htmlhttp://hubip:4444/grid/registerhttp://hubip:4444/grid/register
-
IP .
https://riptutorial.com/ko/home 5
https://i.stack.imgur.com/PZmf0.png
-
seleniumProtocol Node Remote Control () Webdriver Protocol ( ) .•Firefox 5 , Chrome 5 IE 1 .•
Selenium Grid .
Json
https://riptutorial.com/ko/home 6
https://i.stack.imgur.com/KSJMf.png
-
:
java -jar selenium-server-standalone-.jar -role hub -hubConfig hubConfig.json
{ "_comment" : "Configuration for Hub - hubConfig.json", "host": ip, "maxSessions": 5, "port": 4444, "cleanupCycle": 5000, "timeout": 300000, "newSessionWaitTimeout": -1, "servlets": [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": 180000, "platform": "WINDOWS" }
java -jar selenium-server-standalone-.jar -role node -nodeConfig nodeConfig.json
{ "capabilities": [ { "browserName": "opera", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver", "webdriver.opera.driver": "C:/Selenium/drivers/operadriver.exe", "binary":"C:/Program Files/Opera/44.0.2510.1159/opera.exe" }, { "browserName": "chrome", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver", "webdriver.chrome.driver": "C:/Selenium/drivers/chromedriver.exe", "binary":"C:/Program Files/Google/Chrome/Application/chrome.exe" }, { "browserName": "firefox", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver", "webdriver.gecko.driver": "C:/Selenium/drivers/geckodriver.exe", "binary":"C:/Program Files/Mozilla Firefox/firefox.exe" } ], "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": 5, "port": 5555, "register": true, "registerCycle": 5000, "hub": "http://localhost:4444", "nodeStatusCheckTimeout": 5000, "nodePolling": 5000, "role": "node", "unregisterIfStillDownAfter": 60000,
https://riptutorial.com/ko/home 7
-
"downPollingLimit": 2, "debug": false, "servlets" : [], "withoutServlets": [], "custom": {} }
C #
Json C # .
.
Microsoft Edge
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Edge(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName":"MicrosoftEdge", "platform": "WINDOWS", "maxIstances": 1, "seleniumProtocol": "WebDriver" }
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Chrome(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "chrome", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver"
https://riptutorial.com/ko/home 8
-
}
Firefox
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Firefox(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "firefox", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver" }
C # OperaChromium .
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities capabiliteiten = new DesiredCapabilities(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Chosing browser capabiliteiten.SetCapability(CapabilityType.BrowserName, "operablink"); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "operablink", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver" }
.
PlatformType.Android;•PlatformType.Any;•PlatformType.Linux;•PlatformType.Mac;•PlatformType.Unix;•
https://riptutorial.com/ko/home 9
-
PlatformType.Vista;•PlatformType.Windows;•PlatformType.WinNT;•PlatformType.XP;•
Json C #
Json C # .
.
Microsoft Edge
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Edge(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName":"MicrosoftEdge", "platform": "WINDOWS", "maxIstances": 1, "seleniumProtocol": "WebDriver" }
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Chrome(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "chrome", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver" }
https://riptutorial.com/ko/home 10
-
Firefox
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities and chosing browser capabiliteiten = DesiredCapabilities.Firefox(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "firefox", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver" }
C #
// Defining webdriver variable RemoteWebDriver _webDriver; // Creating Capabilities capabiliteiten = new DesiredCapabilities(); // Setting platform capabiliteiten.Platform = new Platform(PlatformType.Windows); // Chosing browser capabiliteiten.SetCapability(CapabilityType.BrowserName, "operablink"); // Requesting remote webdriver _webDriver = new RemoteWebDriver(_gridServerUri, capabiliteiten);
Json
{ "browserName": "operablink", "platform": "WINDOWS", "maxInstances": 5, "seleniumProtocol": "WebDriver" }
.
PlatformType.Android; PlatformType.Any; PlatformType.Linux; PlatformType.Mac; PlatformType.Unix; PlatformType.Vista; PlatformType.Windows; PlatformType.WinNT;
https://riptutorial.com/ko/home 11
-
PlatformType.XP;
: https://riptutorial.com/ko/selenium-grid/topic/8702/--
https://riptutorial.com/ko/home 12
https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1https://riptutorial.com/ko/selenium-grid/topic/8702/%EC%85%80%EB%A0%88%EB%8A%84-%EA%B7%B8%EB%A6%AC%EB%93%9C-%EA%B5%AC%EC%84%B1
-
S. No
Contributors
1 Selenium-Grid Community, Paras
2 Paras, Thomas
https://riptutorial.com/ko/home 13
https://riptutorial.com/ko/contributor/-1/communityhttps://riptutorial.com/ko/contributor/2058844/parashttps://riptutorial.com/ko/contributor/2058844/parashttps://riptutorial.com/ko/contributor/3355907/thomas
약장 1: Selenium-Grid 시작하기비고ExamplesSelenium Grid 란 무엇입니까?허브 및 노드 란 무엇입니까?
장 2: 셀레늄 그리드 구성비고
다운로드h11드라이버브라우저Examples설치 또는 설정
허브 구성노드 구성공지 사항Json 구성C #의 구성 및 사용법
구성Microsoft Edge크롬Firefox오페라구성 Json 및 C # 여러 브라우저
구성Microsoft Edge크롬Firefox오페라
크레딧