How Appium interacts with UIAutomator

Hi,

I wanted to understand how Appium interacts with UIAutomator in Android device/emulator?

I know like whatever script we write(client) sends to Appium(Server) and then appium sends these commands to UIAutomator.

Here i just wanted to understand is UIAutomator behaves like any server or does it have any internal components.

Which portion of this UIAutomator returns response back to Appium?

I know that, UIAutomator is a framework which is used to test Applications(i.e interacting with apps and its settings like launching apps etc…)

But does it have any internal components? What components receive commands from Appium and what components at Appium receives the response?

1 Like

I recommend opening the bootstrap java project in an IDE and navigating around to answer questions like this. The simple answer is adb starts uiautomator which runs the bootstrap test case. The test case creates a socket server and listens for commands. AndroidCommandExecutor is responsible for running the commands.

1 Like

bootstraponline,

I am novice to Java programming in fact Appium also. The three links you provided redirects to source code of your javascript/java files. For me at the current situation to understand this, it takes months time.

So can you/anyone from Appium team, please share a presentation slide/architecture diagram if you have.


1 Like

Hi Bootstraponline,

I explored a bit and prepared following diagram. Can you please review and correct me if my understanding is incorrect.

1 Like

Yes, that looks correct. One thing to note is because we’re using the JSON Wire Protocol, appium’s client libraries are all built upon the upstream Selenium client libraries.