--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
appium.hub = http://127.0.0.1:4723/wd/hub
appium.platformName = android
appium.platformVersion = 5.0
appium.deviceName = 192.168.1.38:5555
appium.browserName = Chrome
appium.app = Chrome
driver = appium
@RunWith(SerenityRunner.class)
public class WL_Android {
@Managed(driver = "appium")
WebDriver driver;
@Steps
Android_Steps wlSteps;
@Test
public void myFirstTC(){
wlSteps.open_app();
System.out.println("hello world");
}
}
Android_Steps.java
public class Android_Steps {
Android_Pages wlPage;
@Step
public void open_app(){
wlPage.open();
}
}
Android_Pages.java
public class Android_Page extends PageObject {
//empty class
}
@DefaultUrl("https://www.etsy.com")
public class WL_Page extends PageObject {
}
I could launch browser on real device and goto that website
Next question what should be value of @DefaultUrl in case of native app testing ??
Once I solve this problem , will share 2 sample projects on github
Thanks again.
Regards,
Vikram
appium.hub = http://127.0.0.1:4723/wd/hub
appium.platformName = android
appium.platformVersion = 5.0
appium.deviceName = 192.168.1.39:5555
appium.app = /Users/vikram-anna/Documents/workspace/Android/apk/android-qa.apk
driver = appium
Is there any unique method to launch apk file on android or void net.serenitybdd.core.pages.PageObject.open() should work ?
Thanks in advance.
Regards,
Vikram
#iOS SIMULATOR (build in XCODE with a debug simulator profile)#-----------------------#webdriver.driver=appium
#appium.platformName=ios
#appium.deviceName=iPhone 6
#appium.autoAcceptAlerts=true
#appium.noReset=false
#appium.app=/Users/Ben/Library/Developer/Xcode/DerivedData/ingogo-glzwuicwzbsmamdwslopjgtigbag/Build/Products/Debug-iphonesimulator/sample.app
#appium.bundleId=net.schmurgon.sample
#appium.locationServicesEnabled=true
#appium.locationServicesAuthorized=true
#serenity.jquery.integration=false
# --------------------
# REAL iOS DEVICE: Build with DEBUG / TEST for physical device, and change the appium.app path to point to the .app file# ---------------------
# Ben's iPhone 6
# appium.udid=<your UDID here>
#---------------------------------------------
# ANDROID #
#---------------------------------------------#
#webdriver.driver=appium
#appium.platformName=Android
#appium.platformVersion=4.4
#appium.appPackage=net.schmurgon.sample
#appium.appActivity=net.schmurgon.sample.screen.main.MainActivity
#
## Android Simulator
##appium.deviceName=Nexus_4_API_19_x86
#
## Samsung Galaxy S5
#appium.deviceName=<list adb devices, will be something like "d6e853c5">
#appium.sendKeyStrategy=setValue
#
#appium.noReset=true
#appium.newCommandTimeout=99999
#appium.app=/Users/Ben/Workspace/net.schmurgon.sample-0.1.119.alpha.apk
#serenity.jquery.integration=false
public class InitialLaunchPage extends PageObject
{
//@FindBy(accessibilityId = "Login")
private WebElementFacade loginButton;
//@FindBy(accessibilityId = "Join")
private WebElementFacade joinButton;
public void login()
{
WebElementFacade loginButton = this.find( MobileBy.AccessibilityId( "Login" ) )
.withTimeoutOf( 10, TimeUnit.SECONDS );
loginButton.click();
}
public void join()
{
WebElementFacade joinButton = this.find( MobileBy.AccessibilityId( "Join" ) )
.withTimeoutOf( 10, TimeUnit.SECONDS );
joinButton.click();
}
}
@ContextConfiguration({ "classpath:applicationContext.xml" })
@RunWith(SerenityRunner.class)
public class WhenMakingRegisteringNewUser
{
@ManagedPages
Pages pages;
@Managed
WebDriver webDriver;
@Rule
public SpringIntegration springIntegration = new SpringIntegration();
InitialLaunchPage launchPage;
JoinPage joinPage;
@BeforeClass
public static void setEnvironment()
{
System.setProperty( "environment", "automation" );
}
@After
public void tearDown() throws Exception
{
ThucydidesWebDriverSupport.getDriver().quit();
}
@Test
public void join_for_first_time()
{
launchPage.join();
joinPage.enterName( "Ben" );
joinPage.enterMobileNumber( "0500999999" );
joinPage.sendVerificationSms();
}
}