Created
May 4, 2018 16:36
-
-
Save jharshit91/aa89ca774d7229b73837294bf00e956c to your computer and use it in GitHub Desktop.
LocalizationTestSuite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import logger.Log; | |
import infra.DriverClass; | |
import io.appium.java_client.AppiumDriver; | |
import io.appium.java_client.MobileElement; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.testng.annotations.AfterSuite; | |
import org.testng.annotations.BeforeTest; | |
import org.testng.annotations.Parameters; | |
import org.testng.annotations.Test; | |
import ScreenHandler.AllPageHandler; | |
public class LocalizationTestSuite { | |
public AppiumDriver<MobileElement> driver = null; | |
public AllPageHandler page; | |
@Parameters({ "deviceName", "platform", "simulator", "udid", "os", | |
"locale", "port" }) | |
@BeforeTest | |
public void Configuration(String deviceName, String platform, | |
String simulator, String udid, String os, String locale, String port) | |
throws MalformedURLException { | |
Log.INFO("In COnfig"); | |
DriverClass in = new DriverClass(); | |
try { | |
driver = in.driver(deviceName, platform, simulator, udid, os, port); | |
page = new AllPageHandler(driver); | |
page.initScreens(locale); | |
} catch (IOException | InterruptedException e) { | |
Log.INFO(e.getMessage()); | |
} | |
} | |
@Test(priority = 1) | |
public void elementPresent() throws InterruptedException { | |
page.getLoginPage().performLogin(); | |
} | |
@Test(priority = 2) | |
public void navigateToSettingScreen() throws InterruptedException { | |
page.getAppSettingPage().tapOnSetting(); | |
page.getAppSettingPage().tapActions(); | |
} | |
@AfterSuite | |
public void teardown() { | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment