Hi There,
I’m a bit frustrated.
I’m only trying to open an app. actually open the Message app on Android.
The only thing I found a biyt helpful was the “Start Activitey” thread. BUT my driver does not contains the StartActivity class as shown: driver.StartActivity(“com.example.android.apis”, “.Foo”).
I need something to start with.
I can open the chrome and run tests on browser on my mobile. next step for me is using the mobile’s app.
Thanks
Yaniv
Define the appActivity and appPackage in DesiredCapabilities and also the URL.
It will open the message app on your android phone.
And to get appActivity and appPackage use command prompt.
problem is I’m using C# and I don’t have AndroidDriver.
These are my using and I’m probably missing something:
using System;
using OpenQA.Selenium;
using NUnit.Framework;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Remote;
using System.Collections.Generic;
using OpenQA.Selenium.Support.PageObjects;
//Appium
using Appium.Interfaces.Generic;
using Appium.Interfaces.Generic.SearchContext;
using Appium.Interfaces;
using OpenQA.Selenium.Appium.Service;
using OpenQA.Selenium.Appium.Android;
using OpenQA.Selenium.Appium.Interfaces;
using OpenQA.Selenium.Appium;
I have a scenario where i do a registration on the app i am testing and it send a message to the registered mobile number. So my capabilities for App & Activities are set for the main app & not for the Messages app.
I am using the startActivity method of AndroidDriver to start the messages app. But when i provide com.android.mms as app & com.android.mms.ui.ConversationList as activity as parameters, it fails to start the app because of permissions issues.
That’s what i am using in the interim, but i also need to test the scenario where multiple registration requests are sent across. In such a case, i will need to go through multiple SMS.
For one SMS, this workaround is working. But i need to find a way to launch the app.
I have one more question - is there a difference between how the app is launched by setting the driver capabilities and when using the startActivity method?