From eea04e513d7ed92ac8a6d50e747e00c89ac0ce5b Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Tue, 25 Aug 2015 22:46:28 +0900 Subject: [PATCH] Update as upstream --- .../ko/development/coding-style.md | 7 +++ .../tutorial/using-selenium-and-webdriver.md | 49 ++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/docs-translations/ko/development/coding-style.md b/docs-translations/ko/development/coding-style.md index 92aa3b4e..1b88be84 100644 --- a/docs-translations/ko/development/coding-style.md +++ b/docs-translations/ko/development/coding-style.md @@ -4,8 +4,15 @@ C++과 Python스크립트는 Chromium의 [코딩 스타일](http://www.chromium.org/developers/coding-style)을 따릅니다. 파이선 스크립트 `script/cpplint.py`를 사용하여 모든 파일이 해당 코딩스타일에 맞게 코딩 되었는지 확인할 수 있습니다. + 파이선의 버전은 2.7을 사용합니다. +C++ 코드는 많은 Chromium의 추상화와 타입을 사용합니다. 그래서 이에 대해 잘 알고 있어야 합니다. +이와 관련하여 시작하기 좋은 장소로 Chromium의 [Important Abstractions and Data Structures] +(https://www.chromium.org/developers/coding-style/important-abstractions-and-data-structures) 문서가 있습니다. +이 문서에선 몇가지 특별한 타입과 스코프 타입(스코프 밖으로 나가면 자동으로 메모리에서 할당을 해제합니다. 스마트 포인터로 보시면 됩니다), +로깅 메커니즘 등을 언급하고 있습니다. + ## CoffeeScript CoffeeScript의 경우 GitHub의 [스타일 가이드](https://github.com/styleguide/javascript)를 따릅니다. 동시에 다음 규칙도 따릅니다: diff --git a/docs-translations/ko/tutorial/using-selenium-and-webdriver.md b/docs-translations/ko/tutorial/using-selenium-and-webdriver.md index 069a49e5..b6178184 100644 --- a/docs-translations/ko/tutorial/using-selenium-and-webdriver.md +++ b/docs-translations/ko/tutorial/using-selenium-and-webdriver.md @@ -29,7 +29,7 @@ Starting ChromeDriver (v2.10.291558) on port 9515 Only local connections are allowed. ``` -곧 사용하므로 포트 `9515`를 기억해 놓습니다. +포트 `9515`는 나중에 사용하므로 기억해 놓읍시다 ### 2. WebDriverJS 설치 @@ -66,6 +66,53 @@ driver.wait(function() { driver.quit(); ``` +## WebdriverIO 설정하기 + +[WebdriverIO](http://webdriver.io/)는 웹 드라이버와 함께 테스트를 위해 제공되는 node 패키지입니다. + +### 1. 크롬 드라이버 시작 + +먼저, `chromedriver` 바이너리를 다운로드 받고 실행합니다: + +```bash +$ chromedriver --url-base=/wd/hub --port=9515 +Starting ChromeDriver (v2.10.291558) on port 9515 +Only local connections are allowed. +``` + +포트 `9515`는 나중에 사용하므로 기억해 놓읍시다 + +### 2. WebDriverIO 설치 + +```bash +$ npm install webdriverio +``` + +### 3. 크롬 드라이버에 연결 +```javascript +var webdriverio = require('webdriverio'); +var options = { + host: "localhost", // Use localhost as chrome driver server + port: 9515, // "9515" is the port opened by chrome driver. + desiredCapabilities: { + browserName: 'chrome', + chromeOptions: {binary: '/Path-to-Your-App.app/Electron'} // Path to your Electron binary. + } +}; + +var client = webdriverio.remote(options); + +client + .init() + .url('http://google.com') + .setValue('#q', 'webdriverio') + .click('#btnG') + .getTitle().then(function(title) { + console.log('Title was: ' + title); + }) + .end(); +``` + ## 작업환경 따로 Electron을 다시 빌드하지 않는 경우 간단히 어플리케이션을 Electron의 리소스 디렉터리에 -- 2.43.0