0

I am using following : Code is in C# Appium 2.0 Device or env Browser stack

When i am trying to use my code to find element by id on above i am not able to find the element by id but when i use same code on my local machine using android emulator i am able to run the code.

Is there any dependency or limitation Please let me know

Thanks

1 Answers1

0

In case of testing web apps in a browser, the elements should be located as usual elements on the web page ( not as some classes like android.widget.EditText and android.widget.Button) that you may have used in your emulator-driven tests. Please note that Browserstack offers real physical devices hosted on cloud platforms and hence the elements may be loading differently as compared to an emulator

So try for example the following and you will see some results:

var element = _driver
        .findElementByXPath("//input[@id='your-element-id-here']");

Here please ensure you fetch the element ids from a real device.