I'm trying to Invoke a Backdoor method. when I run the test it gives:
Invoke for MyBackdoorMethod failed with outcome: ERROR No such method found: MyBackdoorMethod()
what is the Probleme ? Could any one help please ?
My backdoor method:
for Android:
[Export("MyBackdoorMethod")]
public void MyBackdoorMethod()
{
// In through the backdoor - do some work.
}
for IOS:
[Export("myBackdoorMethod:")] // notice the colon at the end of the method name
public void MyBackdoorMethod(NSString value)
{
// In through the backdoor - do some work.
}
and in UI test:
[Test]
public void MyTest()
{
new HomePage()
.OpenNavigationMenu();
if(OnAndroid)
{
app.Invoke("MyBackdoorMethod");
}
else if(OniOS)
{
app.Invoke("myBackdoorMethod:", "the value");
}
}