Search in sources :

Example 1 with FacebookSignupModalComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject in project selenium-tests by Wikia.

the class FacebookTests method userCanSignUpViaFacebook.

@Test(groups = "Facebook_userCanSignUpViaFacebook")
public void userCanSignUpViaFacebook() {
    GraphApi api = new GraphApi();
    HashMap<String, String> test_user = api.createFacebookTestUser(wikiaProductionAppId);
    new FacebookSettingsPageObject(driver).open();
    new FacebookMainPageObject(driver).login(test_user.get("email"), test_user.get("password"));
    AttachedRegisterPage signUp = new AttachedRegisterPage().open();
    FacebookSignupModalComponentObject fbModal = signUp.clickFacebookSignUp();
    String userName = "QA" + signUp.getTimeStamp();
    String password = "Pass" + signUp.getTimeStamp();
    fbModal.createAccountNoEmail(test_user.get("email"), userName, password);
    new WikiBasePageObject().verifyUserLoggedIn(userName);
    api.deleteFacebookTestUser(test_user.get("id"));
}
Also used : GraphApi(com.wikia.webdriver.common.core.api.GraphApi) FacebookSettingsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.facebook.FacebookSettingsPageObject) FacebookMainPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.facebook.FacebookMainPageObject) FacebookSignupModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) AttachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.AttachedRegisterPage) Test(org.testng.annotations.Test)

Example 2 with FacebookSignupModalComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject in project selenium-tests by Wikia.

the class PreferencesPageObject method connectFacebook.

public void connectFacebook(String email, String password) {
    PageObjectLogging.log("connectFacebook", "Connecting FB via FB login dialog", true);
    wait.forElementVisible(fbConnect);
    scrollAndClick(fbConnect);
    waitForNewWindow();
    Object[] windows = driver.getWindowHandles().toArray();
    driver.switchTo().window(windows[1].toString());
    wait.forElementVisible(facebookEmailInput);
    facebookEmailInput.clear();
    facebookEmailInput.sendKeys(email);
    wait.forElementVisible(facebookPasswordInput);
    facebookPasswordInput.clear();
    facebookPasswordInput.sendKeys(password);
    facebookSubmitButton.click();
    driver.switchTo().window(windows[0].toString());
    new FacebookSignupModalComponentObject().acceptWikiaAppPolicy();
    wait.forElementVisible(facebookDisconnect);
}
Also used : FacebookSignupModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) FacebookSignupModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject)

Aggregations

FacebookSignupModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.FacebookSignupModalComponentObject)2 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)2 GraphApi (com.wikia.webdriver.common.core.api.GraphApi)1 AttachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.AttachedRegisterPage)1 FacebookMainPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.facebook.FacebookMainPageObject)1 FacebookSettingsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.facebook.FacebookSettingsPageObject)1 Test (org.testng.annotations.Test)1