Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Invoke for Backdoor Method failed with outcome: ERROR No such method found:

$
0
0

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");
}
}


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>