UC browser automation in appium

I am trying to automate test cases in UCbrowser, but however stuck in switching between native and hybrid view. Same code for switching webview and hybrid view works fine. Is there anything i am missing that i should use for UC browser.

UCBrowser is your phone’s native browser ?

Appium does not support all the browsers e.g. it supports safari,chrome,firefox
It does not support browser Opera etc

Can you share how ur launching appium using, r u launching it some like this
Browser.Type = “Browser” --> It will launch phone native browser

Hi @amitjaincoer191 thanks for the reply. UCBrowser is not phones native browser. its is a playstore app.
I am using capabilities and launching the app.

Appium supports Safari, Chrome, Android native browser. As per opera software appium also works with opera browser, reference however I haven’t tried it yet so can’t say how good the support would be.

Appium does not support UC Browser, FireFox as of now.


Thanks @pr4bh4sh , I wrongly written firefox … appium does not support firefox browser …

Some time back I opened a bug for opera browser which was added for Feb’18 feature list…


Hi @Pradeep_p @pr4bh4sh
Can you please help me in setting up the UBrowser for automating tests. I meant can you please tell me how can I click the button (“Enter UC)” after installing the UCBrowser app.

Also can you also tell me about the views in UCBrowser. How can I check whether they have native view or web view.

I am not sure if appium added support for UCBrowser like it supports chrome,safari browsers etc, if it supports then u can launch it by passing capability in you desired capability object,basically if you pass this capability blank then it launches default browser of your mobile.

BrowserType.Browser=" "

Call driver.getContext() method which will returns a list of contexts like ‘NATIVE_APP’ or ‘WEBVIEW_1’ to know if app is hybrid or not.

WebView can be debugged in chrome remote debugger like we do for selenium
Native App can be debugged using appium inspector / uiautomatorviewer

Hi Amit,

Sorry for the delayed response.
I tried your suggestion and used uiautomator tool and command to see the UI hierarchy.
It worked fine. I just got into another issue where when I run adb adb shell uiautomator dump /data/local/tmp/test.xml it given very small view/UI hierarchy of the activity on android emulator but when I tried the same command hitting my real device it gave the full UI hierarchy dump.
Do you have any idea of this or any pointer to share.

Yes use real device. Android Emulators are very slow.

No I meant do we have any workaround to get the complete web view of UC browser for any page we searched.

Did you manage to automate on UCbrowser? I am facing the same issue