in my case, i want to integrate UI Teting in Visual Studios. Right now, you have to give an applicationpath, for the application to test. My question ist, if it is possible to not give an applicationpath but build the application while testing it. This is the way, the most tutorials explain it (this is from DevExpressBlog):
{
// Launch a new instance of the tested application
if (desktopSession == null)
{
// Create a new session to launch the tested application
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app", ApplicationPath);
desktopSession = new WindowsDriver<WindowsElement>(
new Uri(WindowsApplicationDriverUrl), options);
Assert.IsNotNull(desktopSession);
Assert.IsNotNull(desktopSession.SessionId);
desktopSession.Manage().Timeouts().ImplicitWait =
TimeSpan.FromSeconds(1.5);
}
}
And this is the way, i want to do it like:
{
// Launch a new instance of the tested application
if (desktopSession == null)
{
// Create a new session to launch the tested application
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app", new CfrmMain(A.Fake<IMainViewModel>()));
desktopSession = new WindowsDriver<WindowsElement>(
new Uri(WindowsApplicationDriverUrl), options);
Assert.IsNotNull(desktopSession);
Assert.IsNotNull(desktopSession.SessionId);
desktopSession.Manage().Timeouts().ImplicitWait =
TimeSpan.FromSeconds(1.5);
}
}
Thanks a lot!
Aucun commentaire:
Enregistrer un commentaire