Appium: How to get current window? - selenium

I have Appium 1.4.13
IOSDriver<MobileElement> driver = new IOSDriver<MobileElement>(appiumUrl, desiredCapabilities);
How do I get current window (UIAWindow)? How do I get all elements on that window?

hi Artem appium tool only automates the app not android functionalities so you cant retrieve like home, settings window just like selenium does browser automation not the windows system (for that we use external tools like AutoIt and Sikuli), To retrieve app handles we use getcontextHandles() method to know we are in native app or Web view... hope this helps

Related

Get access to Electron API from Java and Webdriver

I'm writing automation tests for Electron application using Java->Selenide (Selenium)->chromedriver 83.
I can successfully get access to visual elements of the app using xpath locators. But currently I need to check that window of my app is minimized after pressing "Minimize" UI button.
I can't find any easy ways to check that window is minimized from chromedriver.
May I use Electron API to get property win.isVisible or something like that? Or maybe any other ways to check that window of the Electron app is minimized?
Thanks

Start appium inspector, when appium server started programmatically

I have started appium server programmatically (using appium service builder)
now I need appium inspector to inspect elements.
Is there any way to start inspector programmatically or I need to remove my code and use the appium desktop application for server session and inspect elements.
Thanks in advance
If the device is attached to the same host as that of appium server, use uiautomatorviewer under Android SDK to inspect the elements in Android.
For iOS, it is recommended to use Appium Desktop version itself.
Appium inspector is separated from appium server build. You will get separate installation file for appium inspector. You can start it independent of the appium server. Try with the latest version.

Automate iOS application with amCharts element using Appium or Perfecto

Is it possible to automate iOS native application with amCharts elements using Appium or Perfecto ? [Sample amChart]
Perfecto is just mobile device cloud provider, where you can use Appium: so does not affect the possibility.
It may be tricky to parse amCharts for Appium just as it may be tricky to do so for XCUITest (that Appium use for iOS interactions). Since its Objective C wrapper chances are pretty good, but still you will be able to get only numbers and element position in best case.
I suggest to install appium-desktop, start session with your app and make screen snapshot. If appium won't parse it, you may try do it directly in XCode with XCUITest and maybe you need to add some attributes for parsing via Appium

How to launch settings page on real ios device using appium?

I know that accessing built-in apps of real ios device is not directly possible. But we can access them using some launcher apps like for safari we have safari launcher. Similarly can we have settings launcher app to launch the settings app on real ios device. If so, where can I find the launcher app or if possible how can we create it??
Any other idea is also appreciated.
Thanks in advance.
try to launch to com.apple.Preferences
if not try this:
in the capabilities set app as setting:
DesiredCapabilities cap = new DesiredCapabilities();
......
cap.setCapability ("app" , "settings");
driver = new IOSDriver(....);
it should do the work!
I think i have found an answer to this. We can create a settings Launcher app with the help of xcode and can handle all the elements in the settings page. Infact we can create launcher apps for all the native apps of the ios real device.

Calabash Automation Testing

I am new in Automating the apps for testing Android and i like to advance to this level... I have researched for Appium and Calabash... but knowing the difference pretty complicated.. There are my questions:
1: For Calabash, do we need the source code, i mean can i have APK and give test cases and so on? or do I NEED the source code even if im using the elements from app?
2: I heard i can use the Appium with cucumber, and same question do i need source code for that?
I have researched about it and all i get is for Apple apps... but nothing much for android...
You don't need source code. All you need is apk file, packageName and ActivityName to launch the app.
In Appium framework, all you need is app file (for android it will be simply .apk file).
Source code will be never needed, all elements from UI that you would like to interact with, can be simply get from Appium Inspector.
For both calabash and Appium you don't need to source code. you can automate application using apk file.
Yes you can use Appium with cucumber.
To find object locators of application use calabash console and Android UI Viewer, Appium GUI.