-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bai2 #62
base: main
Are you sure you want to change the base?
Bai2 #62
Conversation
|
String url = "https://automationtestpro.com/"; | ||
driver.get(url); | ||
Assert.assertEquals(driver.getCurrentUrl(), url); | ||
//@Test() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
un comment
errorMessage = ""; | ||
} | ||
Assert.assertEquals(errorMessage, "Password is required"); | ||
//Assert.assertTrue(errorMessage.contains("Username is")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xoa
// click login | ||
// driver.findElement(By.xpath("//android.view.ViewGroup[@content-desc=\"test-LOGIN\"]")).click(); | ||
loginPage.clickloginBtn(); | ||
Utils.hardWait(9000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chuyen qua xai explicitly wait
private final String SAUCELABAPP_PACKAGE = "com.swaglabsmobileapp"; | ||
|
||
@Test() | ||
public void loginTest() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bookingTest
//Continue | ||
//driver.findElement(By.xpath("//android.view.ViewGroup[@content-desc=\"test-CONTINUE\"]")).click(); | ||
informationPage.clickContinueBtn(); | ||
Utils.hardWait(9000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm hardwait
|
||
import io.appium.java_client.android.AndroidDriver; | ||
|
||
public class BasePage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected WebElement findElementByLocator(By locator) {
wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
return this.driver.findElement(locator);
}
protected void waitForElementVisible(By locator) {
wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
}
//
protected void waitForElementClickable(By locator) {
wait.until(ExpectedConditions.elementToBeClickable(locator));
}
No description provided.