Appium automates the mobile system

Do the appium automates apart from the mobile applcations and mobile browsers.

i.e.,

Turn on the WiFi settings, make a call, attend the call, send text message, Gallery etc.,

Wifi,MobileData,AeroplaneOption You can do using NetworkConnectionSettings class

make a call
attend a call
send txt msg

For this you need to view elements in uiautomatorviewer and then you can do
It totally depends on system apps setting will they allow u to interact with

e.g. in iOS this is not possible as apple does not allow to interact us with any other app other then app launched for testing.

1 Like

@amitjaincoer191 Thank you very much.

But example let us take the Whatsapp software.

On sharing the image to external application like Facebook or twitter. This scenario goes out of the other application whether this won’t work?

For third party native app’s it will work like

U r inside u r app
You Clicked any button which open facebook app
then minimize the app by pressing HOME button of phone
bring facebook app in focus by clicking switch button on phone
then perform action and again switch back to original app as we did above

Use java client 3.2 or above. Try to understanding this code … It is similar kind of thing

	@Test
	public void installAndLaunchSecondAppTest() throws InterruptedException{
		
		// Wait for first app to load
		By webView = By.className("android.webkit.WebView");
	    WebDriverWait wait = new WebDriverWait(_driver,300);
		wait.until(ExpectedConditions.visibilityOfElementLocated(webView));
	    
		// Start Second app
		String appPackage="io.appium.android.apis";
		String appActivity=".ApiDemos";
		_driver.startActivity(appPackage,appActivity);	
		
		// Press Home Key
		_driver.pressKeyCode(AndroidKeyCode.HOME);
		
		// KEYCODE_APP_SWITCH
		_driver.pressKeyCode(0x000000bb);
		_driver.findElementByAccessibilityId("app1Name");
		// Tap our first app
		List<WebElement> elem = _driver.findElements(By.className("android.widget.FrameLayout"));
		for (int i=0;i<elem.size()-1;i++){
			System.out.println("elem.get(i).getAttribute(name) :: " + elem.get(i).getAttribute("name")) ;
			if (elem.get(i).getAttribute("name").equals("WizIQ")){
				System.out.println("Tapping :: " + elem.get(i).getAttribute("name")) ;
				_driver.tap(1, elem.get(i), 100);
				break;
			}
			
		}			
		Thread.sleep(13000);
	}

I have seen lot of people say Facebook app contains webview during login so interacting with Facebook cannot be done as the FB app we are using does not contains webview debugger enabled so we can never switch context to webview as it will never appear, you can try with twitter

1 Like

@amitjaincoer191 Hi, I have a clarification over here.

When I want to search a contact, can I use the UIAutomatorViewer or I can go ahead with some other java client actions?