MrGrzyboo
MrGrzyboo

Reputation: 97

Android Studio - Google WebDriver

I tried my best to use "Google WebDriver" tool that could be downloaded SDK manager. All I could really find was this: https://android-developers.googleblog.com/2011/10/introducing-android-webdriver.html Post from 2011, unsurprisingly code doesn't work and uses deprecated classes.

So here are my questions:

  1. Is there any example code that would show me how to do anything using this tool?
  2. Should I give up this Android Studio plugin and get selendroid instead? (http://selendroid.io/setup.html)

The best I could do is:

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        simpleGoogleTest();
    }

    private void simpleGoogleTest() {
        WebDriver driver = new AndroidWebDriver(this); // app crashes here

        // ...
    }
}

Upvotes: 2

Views: 1535

Answers (1)

Harry King
Harry King

Reputation: 512

I'm surprised Google WebDriver is tool included in the Android SDK. WebDriver has moved on a lot since 2011. A lot of what you are trying to do can now be achieved with Appium and ChromeDriver.

Upvotes: 1

Related Questions