mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
Added the possibility to add igtimi accounts via Selenium
This commit is contained in:
1 parent
7ebc53fbd4
commit
41c0281cd5
3 files changed
+49
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
package com.sap.sailing.selenium.pages.adminconsole.igtimi;
|
||||
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
import com.sap.sailing.selenium.core.BySeleniumId;
|
||||
import com.sap.sailing.selenium.core.FindBy;
|
||||
import com.sap.sailing.selenium.pages.common.DataEntryDialogPO;
|
||||
|
||||
public class AddIgtimiAccountDialogPO extends DataEntryDialogPO {
|
||||
@FindBy(how = BySeleniumId.class, using = "igtimiAccountEmail")
|
||||
private WebElement igtimiAccountEmail;
|
||||
|
||||
@FindBy(how = BySeleniumId.class, using = "igtimiAccountPassword")
|
||||
private WebElement igtimiAccountPassword;
|
||||
|
||||
public AddIgtimiAccountDialogPO(WebDriver driver, WebElement element) {
|
||||
super(driver, element);
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
igtimiAccountEmail.sendKeys(email);
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
igtimiAccountPassword.sendKeys(password);
|
||||
}
|
||||
}
|
||||
+17
@@ -3,6 +3,8 @@ package com.sap.sailing.selenium.pages.adminconsole.igtimi;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
import com.sap.sailing.selenium.core.BySeleniumId;
|
||||
import com.sap.sailing.selenium.core.FindBy;
|
||||
import com.sap.sailing.selenium.pages.PageArea;
|
||||
|
||||
/**
|
||||
@@ -13,6 +15,9 @@ import com.sap.sailing.selenium.pages.PageArea;
|
||||
*/
|
||||
public class IgtimiAccountsManagementPanelPO extends PageArea {
|
||||
|
||||
@FindBy(how = BySeleniumId.class, using = "addIgtimiAccount")
|
||||
private WebElement addIgtimiAccount;
|
||||
|
||||
/**
|
||||
* <p></p>
|
||||
*
|
||||
@@ -24,4 +29,16 @@ public class IgtimiAccountsManagementPanelPO extends PageArea {
|
||||
public IgtimiAccountsManagementPanelPO(WebDriver driver, WebElement element) {
|
||||
super(driver, element);
|
||||
}
|
||||
|
||||
public AddIgtimiAccountDialogPO openAddIgtimiAccountDialog() {
|
||||
addIgtimiAccount.click();
|
||||
return getPO(AddIgtimiAccountDialogPO::new, "AddIgtimiAccountDialog");
|
||||
}
|
||||
|
||||
public void addAccount(String email, String password) {
|
||||
AddIgtimiAccountDialogPO addIgtimiAccountDialog = openAddIgtimiAccountDialog();
|
||||
addIgtimiAccountDialog.setEmail(email);
|
||||
addIgtimiAccountDialog.setPassword(password);
|
||||
addIgtimiAccountDialog.pressOk();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user