{"action":"created","comment":{"url":"https://api.github.com/repos/cucumber/cucumber/pulls/comments/133468107","pull_request_review_id":56650669,"id":133468107,"diff_hunk":"@@ -0,0 +1,80 @@\n+## Selenium WebDriver\n+\n+WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API. Selenium-WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded. WebDriver�s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.\n+ \n+Let us see an example how cucumber can fit into selenium-webdriver in UI testinng, by converting [Selenium-Web driver by example     ](http://docs.seleniumhq.org/docs/03_webdriver.jsp#introducing-the-selenium-webdriver-api-by-example \"Selenium-Webdriver by Example tutorial\")\n+ \n+ We can express the example as the following Scenario:\n+ \n+ ```gherkin\n+ Scenario: Finding some cheese\n+   Given I am on the Google search page\n+   When I search for \"Cheese!\"\n+   Then the page title should start with \"cheese\"\n+ \n+ ```java\n+ \n+ USING JAVA\n+ {% codetabs name=\"Java\", type=\"java\" -%}\n+ package class.exmple;\n+ \n+ public class ExampleSteps {\n+ \n+      private final WebDriver driver = new FirefoxDriver();\n+      @Given(\"^I am on the Google search page$\"\\)\n+      public void I_visit_google() {\n+      driver.get(\"https:\\\\www.google.com\");\n+     }\n+ \n+     @When(\"^I search for \\\"(.*)\\\"$\")\n+       public void search_for(String query) {\n+          WebElement element = browser.findElelment(By.name(\"q\"));\n+          \\\\Enter Something to search for\n+          element.sendKeys(query);\n+          \\\\Now submit the form. WebDriver will find the form for us from the element\n+          element.submit();\n+     }\n+ \n+     @Then(\"^ the page title should start with \\\"(.*)\\\"$\")\n+     public void checkTitle() {\n+        \\\\Google's search is rendered dynamically with JavaScript.\n+        \\\\Wait for the page to load timeout after 10 second\n+         (new WebDriverWait(driver, 10)).untill(new ExpectedCondition&lt;Boolean&gt; {\n+         public Boolean apply(WebDriver d) {\n+         return d.getTitle().toLowerCase.startsWith(\"cheese\");\n+         \\\\Should see: \"cheese! -Google Search\"\n+      }\n+ \n+ @After()\n+   public void closeBrowser() {\n+     driver.quit();\n+   }\n+ }\n+{%- endcodetabs %}\n+ ```\n+ \n+```ruby\n+ USING RUBY:\n+ {% codetabs name=\"Ruby\", type=\"rb\" -%}\n+ require 'rubygems'\n+ require 'selenium-webdriver'\n+ \n+ Given(\"^I am on the Google search page$\") do\n+  driver = Selenium::WebDriver.for :firefox","path":"docs/selenium-webdriver.md","position":63,"original_position":63,"commit_id":"f3af79ce335f2b5fcdc7fbd5ef3f68cf9a3fd14a","original_commit_id":"f3af79ce335f2b5fcdc7fbd5ef3f68cf9a3fd14a","user":{"login":"olleolleolle","id":211,"avatar_url":"https://avatars0.githubusercontent.com/u/211?v=4","gravatar_id":"","url":"https://api.github.com/users/olleolleolle","html_url":"https://github.com/olleolleolle","followers_url":"https://api.github.com/users/olleolleolle/followers","following_url":"https://api.github.com/users/olleolleolle/following{/other_user}","gists_url":"https://api.github.com/users/olleolleolle/gists{/gist_id}","starred_url":"https://api.github.com/users/olleolleolle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olleolleolle/subscriptions","organizations_url":"https://api.github.com/users/olleolleolle/orgs","repos_url":"https://api.github.com/users/olleolleolle/repos","events_url":"https://api.github.com/users/olleolleolle/events{/privacy}","received_events_url":"https://api.github.com/users/olleolleolle/received_events","type":"User","site_admin":false},"body":"For Ruby, use 2 spaces as the indentation inside `do..end` blocks.","created_at":"2017-08-16T14:36:03Z","updated_at":"2017-08-16T14:46:18Z","html_url":"https://github.com/cucumber/cucumber/pull/247#discussion_r133468107","pull_request_url":"https://api.github.com/repos/cucumber/cucumber/pulls/247","_links":{"self":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/comments/133468107"},"html":{"href":"https://github.com/cucumber/cucumber/pull/247#discussion_r133468107"},"pull_request":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/247"}}},"pull_request":{"url":"https://api.github.com/repos/cucumber/cucumber/pulls/247","id":136039707,"html_url":"https://github.com/cucumber/cucumber/pull/247","diff_url":"https://github.com/cucumber/cucumber/pull/247.diff","patch_url":"https://github.com/cucumber/cucumber/pull/247.patch","issue_url":"https://api.github.com/repos/cucumber/cucumber/issues/247","number":247,"state":"open","locked":false,"title":"[Cucumber] [Cucumber/docs]Selenium webdriver.md and watir webdriver","user":{"login":"mgundala","id":20752705,"avatar_url":"https://avatars2.githubusercontent.com/u/20752705?v=4","gravatar_id":"","url":"https://api.github.com/users/mgundala","html_url":"https://github.com/mgundala","followers_url":"https://api.github.com/users/mgundala/followers","following_url":"https://api.github.com/users/mgundala/following{/other_user}","gists_url":"https://api.github.com/users/mgundala/gists{/gist_id}","starred_url":"https://api.github.com/users/mgundala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgundala/subscriptions","organizations_url":"https://api.github.com/users/mgundala/orgs","repos_url":"https://api.github.com/users/mgundala/repos","events_url":"https://api.github.com/users/mgundala/events{/privacy}","received_events_url":"https://api.github.com/users/mgundala/received_events","type":"User","site_admin":false},"body":"\r\n## Summary\r\n\r\nAdded Selenium-webdriver.md and watir-webdriver.md files to cucumber docs\r\n\r\n\r\n## Details\r\n\r\nThere were few conflicts in previous documentation (Pull request #54). So created a new pull request.\r\n\r\n## Motivation and Context\r\n\r\nAdding more value to documentation. Missed it for a while will continue going forward\r\n\r\n## How Has This Been Tested?\r\n\r\nNeed to be reviewed by peers\r\n\r\n## Screenshots (if appropriate):\r\nNA\r\n## Types of changes\r\nNA\r\n- [ ] Bug fix (non-breaking change which fixes an issue).\r\n- [ ] New feature (non-breaking change which adds functionality).\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).\r\n\r\n## Checklist:\r\n\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [ ] I've added tests for my code.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n","created_at":"2017-08-16T14:29:32Z","updated_at":"2017-08-16T14:46:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"266768267b47b5d6cc99f6e3954f6c001871e2e6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cucumber/cucumber/pulls/247/commits","review_comments_url":"https://api.github.com/repos/cucumber/cucumber/pulls/247/comments","review_comment_url":"https://api.github.com/repos/cucumber/cucumber/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cucumber/cucumber/issues/247/comments","statuses_url":"https://api.github.com/repos/cucumber/cucumber/statuses/f3af79ce335f2b5fcdc7fbd5ef3f68cf9a3fd14a","head":{"label":"mgundala:master","ref":"master","sha":"f3af79ce335f2b5fcdc7fbd5ef3f68cf9a3fd14a","user":{"login":"mgundala","id":20752705,"avatar_url":"https://avatars2.githubusercontent.com/u/20752705?v=4","gravatar_id":"","url":"https://api.github.com/users/mgundala","html_url":"https://github.com/mgundala","followers_url":"https://api.github.com/users/mgundala/followers","following_url":"https://api.github.com/users/mgundala/following{/other_user}","gists_url":"https://api.github.com/users/mgundala/gists{/gist_id}","starred_url":"https://api.github.com/users/mgundala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgundala/subscriptions","organizations_url":"https://api.github.com/users/mgundala/orgs","repos_url":"https://api.github.com/users/mgundala/repos","events_url":"https://api.github.com/users/mgundala/events{/privacy}","received_events_url":"https://api.github.com/users/mgundala/received_events","type":"User","site_admin":false},"repo":{"id":64687584,"name":"cucumber","full_name":"mgundala/cucumber","owner":{"login":"mgundala","id":20752705,"avatar_url":"https://avatars2.githubusercontent.com/u/20752705?v=4","gravatar_id":"","url":"https://api.github.com/users/mgundala","html_url":"https://github.com/mgundala","followers_url":"https://api.github.com/users/mgundala/followers","following_url":"https://api.github.com/users/mgundala/following{/other_user}","gists_url":"https://api.github.com/users/mgundala/gists{/gist_id}","starred_url":"https://api.github.com/users/mgundala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgundala/subscriptions","organizations_url":"https://api.github.com/users/mgundala/orgs","repos_url":"https://api.github.com/users/mgundala/repos","events_url":"https://api.github.com/users/mgundala/events{/privacy}","received_events_url":"https://api.github.com/users/mgundala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgundala/cucumber","description":"Cucumber parent project - keeping all implementations in sync","fork":true,"url":"https://api.github.com/repos/mgundala/cucumber","forks_url":"https://api.github.com/repos/mgundala/cucumber/forks","keys_url":"https://api.github.com/repos/mgundala/cucumber/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgundala/cucumber/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgundala/cucumber/teams","hooks_url":"https://api.github.com/repos/mgundala/cucumber/hooks","issue_events_url":"https://api.github.com/repos/mgundala/cucumber/issues/events{/number}","events_url":"https://api.github.com/repos/mgundala/cucumber/events","assignees_url":"https://api.github.com/repos/mgundala/cucumber/assignees{/user}","branches_url":"https://api.github.com/repos/mgundala/cucumber/branches{/branch}","tags_url":"https://api.github.com/repos/mgundala/cucumber/tags","blobs_url":"https://api.github.com/repos/mgundala/cucumber/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgundala/cucumber/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgundala/cucumber/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgundala/cucumber/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgundala/cucumber/statuses/{sha}","languages_url":"https://api.github.com/repos/mgundala/cucumber/languages","stargazers_url":"https://api.github.com/repos/mgundala/cucumber/stargazers","contributors_url":"https://api.github.com/repos/mgundala/cucumber/contributors","subscribers_url":"https://api.github.com/repos/mgundala/cucumber/subscribers","subscription_url":"https://api.github.com/repos/mgundala/cucumber/subscription","commits_url":"https://api.github.com/repos/mgundala/cucumber/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgundala/cucumber/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgundala/cucumber/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgundala/cucumber/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgundala/cucumber/contents/{+path}","compare_url":"https://api.github.com/repos/mgundala/cucumber/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgundala/cucumber/merges","archive_url":"https://api.github.com/repos/mgundala/cucumber/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgundala/cucumber/downloads","issues_url":"https://api.github.com/repos/mgundala/cucumber/issues{/number}","pulls_url":"https://api.github.com/repos/mgundala/cucumber/pulls{/number}","milestones_url":"https://api.github.com/repos/mgundala/cucumber/milestones{/number}","notifications_url":"https://api.github.com/repos/mgundala/cucumber/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgundala/cucumber/labels{/name}","releases_url":"https://api.github.com/repos/mgundala/cucumber/releases{/id}","deployments_url":"https://api.github.com/repos/mgundala/cucumber/deployments","created_at":"2016-08-01T17:30:27Z","updated_at":"2017-08-16T14:03:36Z","pushed_at":"2017-08-16T14:17:40Z","git_url":"git://github.com/mgundala/cucumber.git","ssh_url":"git@github.com:mgundala/cucumber.git","clone_url":"https://github.com/mgundala/cucumber.git","svn_url":"https://github.com/mgundala/cucumber","homepage":null,"size":2316,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cucumber:master","ref":"master","sha":"c413e7ccb608070292b949cf399fb4e118748bc6","user":{"login":"cucumber","id":320565,"avatar_url":"https://avatars0.githubusercontent.com/u/320565?v=4","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"repo":{"id":37796696,"name":"cucumber","full_name":"cucumber/cucumber","owner":{"login":"cucumber","id":320565,"avatar_url":"https://avatars0.githubusercontent.com/u/320565?v=4","gravatar_id":"","url":"https://api.github.com/users/cucumber","html_url":"https://github.com/cucumber","followers_url":"https://api.github.com/users/cucumber/followers","following_url":"https://api.github.com/users/cucumber/following{/other_user}","gists_url":"https://api.github.com/users/cucumber/gists{/gist_id}","starred_url":"https://api.github.com/users/cucumber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cucumber/subscriptions","organizations_url":"https://api.github.com/users/cucumber/orgs","repos_url":"https://api.github.com/users/cucumber/repos","events_url":"https://api.github.com/users/cucumber/events{/privacy}","received_events_url":"https://api.github.com/users/cucumber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cucumber/cucumber","description":"Cucumber parent project - keeping all implementations in sync","fork":false,"url":"https://api.github.com/repos/cucumber/cucumber","forks_url":"https://api.github.com/repos/cucumber/cucumber/forks","keys_url":"https://api.github.com/repos/cucumber/cucumber/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cucumber/cucumber/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cucumber/cucumber/teams","hooks_url":"https://api.github.com/repos/cucumber/cucumber/hooks","issue_events_url":"https://api.github.com/repos/cucumber/cucumber/issues/events{/number}","events_url":"https://api.github.com/repos/cucumber/cucumber/events","assignees_url":"https://api.github.com/repos/cucumber/cucumber/assignees{/user}","branches_url":"https://api.github.com/repos/cucumber/cucumber/branches{/branch}","tags_url":"https://api.github.com/repos/cucumber/cucumber/tags","blobs_url":"https://api.github.com/repos/cucumber/cucumber/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cucumber/cucumber/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cucumber/cucumber/git/refs{/sha}","trees_url":"https://api.github.com/repos/cucumber/cucumber/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cucumber/cucumber/statuses/{sha}","languages_url":"https://api.github.com/repos/cucumber/cucumber/languages","stargazers_url":"https://api.github.com/repos/cucumber/cucumber/stargazers","contributors_url":"https://api.github.com/repos/cucumber/cucumber/contributors","subscribers_url":"https://api.github.com/repos/cucumber/cucumber/subscribers","subscription_url":"https://api.github.com/repos/cucumber/cucumber/subscription","commits_url":"https://api.github.com/repos/cucumber/cucumber/commits{/sha}","git_commits_url":"https://api.github.com/repos/cucumber/cucumber/git/commits{/sha}","comments_url":"https://api.github.com/repos/cucumber/cucumber/comments{/number}","issue_comment_url":"https://api.github.com/repos/cucumber/cucumber/issues/comments{/number}","contents_url":"https://api.github.com/repos/cucumber/cucumber/contents/{+path}","compare_url":"https://api.github.com/repos/cucumber/cucumber/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cucumber/cucumber/merges","archive_url":"https://api.github.com/repos/cucumber/cucumber/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cucumber/cucumber/downloads","issues_url":"https://api.github.com/repos/cucumber/cucumber/issues{/number}","pulls_url":"https://api.github.com/repos/cucumber/cucumber/pulls{/number}","milestones_url":"https://api.github.com/repos/cucumber/cucumber/milestones{/number}","notifications_url":"https://api.github.com/repos/cucumber/cucumber/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cucumber/cucumber/labels{/name}","releases_url":"https://api.github.com/repos/cucumber/cucumber/releases{/id}","deployments_url":"https://api.github.com/repos/cucumber/cucumber/deployments","created_at":"2015-06-21T04:37:35Z","updated_at":"2017-08-16T10:45:30Z","pushed_at":"2017-08-16T14:29:33Z","git_url":"git://github.com/cucumber/cucumber.git","ssh_url":"git@github.com:cucumber/cucumber.git","clone_url":"https://github.com/cucumber/cucumber.git","svn_url":"https://github.com/cucumber/cucumber","homepage":null,"size":6192,"stargazers_count":1228,"watchers_count":1228,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":236,"mirror_url":null,"open_issues_count":64,"forks":236,"open_issues":64,"watchers":1228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/247"},"html":{"href":"https://github.com/cucumber/cucumber/pull/247"},"issue":{"href":"https://api.github.com/repos/cucumber/cucumber/issues/247"},"comments":{"href":"https://api.github.com/repos/cucumber/cucumber/issues/247/comments"},"review_comments":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/247/comments"},"review_comment":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cucumber/cucumber/pulls/247/commits"},"statuses":{"href":"https://api.github.com/repos/cucumber/cucumber/statuses/f3af79ce335f2b5fcdc7fbd5ef3f68cf9a3fd14a"}}}}
{"actor":{"display_login":"olleolleolle"}}