GitHub PullRequestReviewCommentEvent at 2014-01-21 11:01:06
Repository: selenium-tests
Actor: justnpT
Payload: {"comment":{"url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments/9033261","id":9033261,"diff_hunk":"@@ -0,0 +1,83 @@\n+package com.wikia.webdriver.PageObjectsFactory.ComponentObject.ModalWindows;\n+\n+import java.util.Set;\n+\n+import org.openqa.selenium.WebDriver;\n+import org.openqa.selenium.WebElement;\n+import org.openqa.selenium.support.FindBy;\n+\n+import com.wikia.webdriver.Common.Logging.PageObjectLogging;\n+import com.wikia.webdriver.PageObjectsFactory.PageObject.WikiBasePageObject;\n+\n+/**\n+* @author Michal 'justnpT' Nowierski\n+*/\n+public class FacebookSignupModalComponentObject extends WikiBasePageObject {\n+\n+\t@FindBy(css = \"button[name='__CONFIRM__']\")\n+\tprivate WebElement appTermsConfirmButton;\n+\t@FindBy(css = \"#u_1_7\")\n+\tprivate WebElement postingPolicyWindowIndicator;\n+\t@FindBy(css = \"#FacebookSignUp input[name='username']\")\n+\tprivate WebElement usernameField;\n+\t@FindBy(css = \"#FacebookSignUp input[name='password']\")\n+\tprivate WebElement passwordField;\n+\t@FindBy(css = \"#FacebookSignUp input[type='submit']\")\n+\tprivate WebElement createAccountButton;\n+\n+\tString winHandleBefore;\n+\n+\tpublic FacebookSignupModalComponentObject(WebDriver driver, String winHandleBeforeFBClick) {\n+\t\tsuper(driver);\n+\t\twinHandleBefore = winHandleBeforeFBClick;\n+\t}\n+\n+\tpublic void acceptWikiaAppPolicy() {\n+\t\t// If policies are already accepted, give facebook popup window time to disappear\n+\t\ttry {\n+\t\t\tThread.sleep(2000);\n+\t\t} catch (InterruptedException e) {\n+\t\t\tPageObjectLogging.log(\"acceptWikiaAppPolicy\", e.getMessage(), false);\n+\t\t}\n+\n+\t\tSet<String> handles = driver.getWindowHandles();\n+\n+\t\tif (handles.size()>1) {\n+\t\t\tfor(String winHandle : handles){\n+\t\t\t\t//Switch to new window opened\n+\t\t\t\tdriver.switchTo().window(winHandle);\n+\t\t\t}\n+\t\t\twaitForElementByElement(appTermsConfirmButton);\n+\t\t\tappTermsConfirmButton.click();\n+\t\t\tPageObjectLogging.log(\"acceptWikiaAppPolicy\", \"confirmed wikia apps privacy policy\", true);\n+\t\t\twaitForElementByElement(postingPolicyWindowIndicator);\n+\t\t\twaitForElementByElement(appTermsConfirmButton);\n+\t\t\tappTermsConfirmButton.click();\n+\t\t\tPageObjectLogging.log(\"acceptWikiaAppPolicy\", \"confirmed wikia apps posting policy\", true);\n+\t\t\t// Switch back to original browser (first window)\n+\t\t\tdriver.switchTo().window(winHandleBefore);\n+\t\t}\n+\t\telse {\n+\t\t\tPageObjectLogging.log(\"acceptWikiaAppPolicy\", \"wikia apps policies allready accepted\", true);","path":"src/test/java/com/wikia/webdriver/PageObjectsFactory/ComponentObject/ModalWindows/FacebookSignupModalComponentObject.java","position":61,"original_position":61,"commit_id":"ea3b881b4fd80cad282547b99f821afc44e25f0d","original_commit_id":"ea3b881b4fd80cad282547b99f821afc44e25f0d","user":{"login":"justnpT","id":1735454,"avatar_url":"https://gravatar.com/avatar/7165e8d692ac0b6181721c03440588e1?d=https%3A%2F%2Fidenticons.github.com%2Fc491835d4bba19fb356f48203c56c6fb.png&r=x","gravatar_id":"7165e8d692ac0b6181721c03440588e1","url":"https://api.github.com/users/justnpT","html_url":"https://github.com/justnpT","followers_url":"https://api.github.com/users/justnpT/followers","following_url":"https://api.github.com/users/justnpT/following{/other_user}","gists_url":"https://api.github.com/users/justnpT/gists{/gist_id}","starred_url":"https://api.github.com/users/justnpT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justnpT/subscriptions","organizations_url":"https://api.github.com/users/justnpT/orgs","repos_url":"https://api.github.com/users/justnpT/repos","events_url":"https://api.github.com/users/justnpT/events{/privacy}","received_events_url":"https://api.github.com/users/justnpT/received_events","type":"User","site_admin":false},"body":"add 'are' to the sentence","created_at":"2014-01-21T11:01:06Z","updated_at":"2014-01-21T11:01:06Z","html_url":"https://github.com/Wikia/selenium-tests/pull/139#discussion_r9033261","pull_request_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments/9033261"},"html":{"href":"https://github.com/Wikia/selenium-tests/pull/139#discussion_r9033261"},"pull_request":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/139"}}}}