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"));
}
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);
}
Aggregations