# I am not getting option to use driver.findElementByUiAutomator

**URL:** <https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474>\
**Category:** Issues/Bugs\
**Created:** [January 28, 2017, 11:03am UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474 "2017-01-28T11:03:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreyansh791](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/a9a28c/32.png) [@shreyansh791](https://discuss.appium.io/u/shreyansh791)\
**Post date:** [January 28, 2017, 11:03am UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/1 "2017-01-28T11:03:15Z")

</div>

Please find the attached screenshot.

 ![](https://discuss.appium.io/uploads/default/original/2X/c/ce79ce59493a4a27fc5e11197851362e66bf98f4.png)

---

<div class="post-metadata">

**Author:** ![Telmo\_Cardoso](https://discuss.appium.io/user_avatar/discuss.appium.io/telmo_cardoso/32/1435_2.png) [@Telmo\_Cardoso](https://discuss.appium.io/u/Telmo_Cardoso)\
**Post date:** [January 28, 2017, 12:14pm UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/2 "2017-01-28T12:14:49Z")

</div>

Hi,

you sure that your AndroidDriver is from io.appium.java\_client.android.AndroidDriver ?

---

<div class="post-metadata">

**Author:** ![shreyansh791](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/a9a28c/32.png) [@shreyansh791](https://discuss.appium.io/u/shreyansh791)\
**Post date:** [January 28, 2017, 12:31pm UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/3 "2017-01-28T12:31:07Z")

</div>

Yes AndroidDriver is coming from io.appium.java\_client.android.AndroidDriver

Please find the attached screenshot.

 ![](https://discuss.appium.io/uploads/default/original/2X/4/42d956f3358226b7b09bee2f5349dc0c56de1a1a.png)

 ![](https://discuss.appium.io/uploads/default/original/2X/8/87fed54bc3380b33617f32448b0bfb36d5edc69d.png)

---

<div class="post-metadata">

**Author:** ![Telmo\_Cardoso](https://discuss.appium.io/user_avatar/discuss.appium.io/telmo_cardoso/32/1435_2.png) [@Telmo\_Cardoso](https://discuss.appium.io/u/Telmo_Cardoso)\
**Post date:** [January 28, 2017, 4:29pm UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/4 "2017-01-28T16:29:08Z")

</div>

I always used my driver as AppiumDriver. You are using as RemoteWebDriver.

I’m not sure why you are using that, but if you cast it, it will work:

```
((AndroidDriver)driver).findElementByAndroidUIAutomator("...");

```

Look here also for more info on drivers:

> [@What is the use or difference between AndroidDriver, iOSDriver, AppiumDriver and Remote WebDriver](https://discuss.appium.io/t/what-is-the-use-or-difference-between-androiddriver-iosdriver-appiumdriver-and-remote-webdriver/8750):
>
> There are different types of drivers and I want to know their exact usages and purpose in which condition.

---

<div class="post-metadata">

**Author:** ![shreyansh791](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/a9a28c/32.png) [@shreyansh791](https://discuss.appium.io/u/shreyansh791)\
**Post date:** [January 29, 2017, 4:03am UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/5 "2017-01-29T04:03:23Z")

</div>

Thanks! I will try it,

---

<div class="post-metadata">

**Author:** ![nanda\_kishore](https://discuss.appium.io/letter_avatar_proxy/v4/letter/n/f08c70/32.png) [@nanda\_kishore](https://discuss.appium.io/u/nanda_kishore)\
**Post date:** [February 25, 2017, 9:09pm UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/6 "2017-02-25T21:09:57Z")

</div>

Hi,

Am also facing the same issue

please help

---

<div class="post-metadata">

**Author:** ![anish10110](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@anish10110](https://discuss.appium.io/u/anish10110)\
**Post date:** [February 27, 2017, 12:09am UTC](https://discuss.appium.io/t/i-am-not-getting-option-to-use-driver-findelementbyuiautomator/14474/7 "2017-02-27T00:09:45Z")

</div>

> [@nanda\_kishore](#):
>
> the same issue
> 
> please help

Hi,

As mentioned above, please make sure that you are using AndroidDriver instead of WebDriver. Even if you are using WebDriver, you can cast it to AndroidDriver

((AndroidDriver)driver).findElementByUIAutomator(“…”)

Also, please make sure that you are using the latest version of Java Client - [GitHub - appium/java-client: Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol](https://github.com/appium/java-client)
