What are the ways or tools available to inspect element in a Mac desktop application - macos

We have firebug or chropath or inspect element methods to find locators of a web application. Similarly, how to identify element of a Mac desktop application (for example, iTunes desktop app)?
Thanks in advance.

Use Accessibility Inspector,just type in Inspector in the spotlight. So far, its able to get class, text and labels, but not well recognize using it with Appium. I am hoping for a better more accurate tool.

You can use pyatom (python library for automated testing on MAC).
PyAtom is Python library to fully enable GUI testing of Mac applications via the Apple Accessibility API.
Github link - https://github.com/pyatom/pyatom

Related

UI Automation for AppleTV system using XCode

Is UI automation available for the main menu of the Apple TV and not a specific application? I already setup the whole UI testing thing using XCode and tried using the remote control but it is only available for the application that was defined using XCUIApplication.
So is it possible to control the whole system rather than a specific application? I was thinking of something similar to pyatv but using XCode since I might be able to get more information concerning the current focused apps and so on.
There is an API XCUIApplication(bundleIdentifier: ) to interact with not-AUT apps. You need to substitute the right identifier for this Springboard-like interface. Maybe it is a Headboard, but I'm not sure.
Bundle identifiers of tvOS apps https://github.com/rzakhar/XCTApps/blob/master/Sources/XCTApps/tvOS.swift

Finding elements by xpath in Appium using XCUITEST driver

The task of updating an automation framework has fallen upon me. I'm new to iOS testing so I'm having trouble with the new XCUITEST driver in Appium-1.6.0-beta1.
I have the driver up and running, but the majority of elements are located using xpaths in the framework (not at all ideal I know) the majority of elements do not have labels, names, or accessibility tags. Thus :name locators are ruled out for 90% of elements at the moment.
The xpaths seem to be catering to the old apple framework (UIAutomation) and look like the following:
//UIAApplication[1]/UIAWindow[4]/UIAAlert[1]
I have tried soemthing like this:
//XCUIApplication[1]/XCUIElementTypeWindow[4]/XCUIElementTypeAlert[1]
These are passed into driver.find_element(:xpath, xpath_value) With no luck. I can't seem to find any documentation on this, and have had minimal success on the appium discussion forum.
Can anyone point me to a working example, or documentation? Any better way to do this?
Any input would really help!
Thanks,
Peter
Not all of the XCUI elements are direct transfers from UIAutomator. The way I have been using is to run the tests without the xpaths you need and when you open onto the screen you desire go:
System.out.println(driver.getPageSource());
Then it is a matter of reading that XML to get the desired item. A lot more tedious but without the appium inspector in 1.6BetaX it's the only way I know how to get the XCUI hierarchy.
With little workaround, you can use the old graphical appium to find xpath of view elements for using with Appium v1.6 Follow the step 1 in this link on medium:
The good old Appium inspector, with a bit workaround
The above answer by JaysonP works fine but there still is a way to use the appium inspector.
Run appium you are using (appium 1.6.x ) from terminal/command line
Open appium GUI application but Do NOT run it
In the GUI, give the App Path
Make sure both the GUI version and the one you are running on terminal are using the same port. Once again DO NOT launch appium from the GUI
Click the Inspector button without launching appium
Inspector window should be opened and you can use the way you have been using it previously

Wrapper around web-app under Windows

I have an application with web interface. Unfortunately, it has all disadvantages of being a web page:
It doesn't have a standalone window, so users cannot manage it via the taskbar.
Users see the address line with something like 'http://localhost:8080' that is not a good idea for home users.
If users click on a tray icon, there is no way to activate the tab in a browser, which contain the application interface.
So, it would be nice to have a wrapper application with a browser within.
In case of IE I know it's possible to create a window with Trident ActiveX component. But what if it's Windows XP with IE6 but installed latest Chrome? I'd like to prefer Chrome since it supports a lot more features which the user will never see.
So, is there a way to wrap a page into Chrome/Firefox and make it look like a standalone application, if one of them is presented in the user's system? (The application shouldn't install anything large, so Chromium build is not an option).
P.S. I'm not interested in supporting other platforms than Windows.
Regards,
Take a look at Chrome Apps.
I hope helps you.

Do XUL applications work only on Firefox

I've seen an XUL-based application recently that supposedly works on the desktop. Isn't XUL the Firefox language? I thought it wouldn't work on anything other that Firefox and certainly wouldn't work as a desktop application.
Can someone who knows more about XUL confirm its compatibility with other browsers (IE, Chrome, etc.) and if it runs as a desktop application, its compatibility with operating systems (Windows, Mac, Linux)
check out http://en.wikipedia.org/wiki/XULRunner. it was created to run xul applications like firefox. songbird is also based in XUL. for more detail see this SO question.
to actually answer the real question, yes, desktop apps can be built in xul, as firefox is. the wiki page i linked to even points to a video game being built using it. at its core its just another application framework.
XUL is a descriptive language for UI used in Firefox but also used in other mozilla apps, like Thunderbird for example
There is a projet named Xul Runner which allow using XUL for desktop apps (see Pencil for example).
AFAIK, all Mozilla apps are compatible with Windows, Mac, Linux and other system for some.
XUL is a user interface language. It was created originally for mozilla/firefox, but is also used by thunderbird.
The Gecko layout engine is what renders XUL and any application that uses this engine can be built with it. See XUL Runner.
The layout engine has been written with cross platform concerns, so it runs on Windows, Linux and Macs.
XUL only works on xulrunner, and Firefox is built on top of xulrunner. Other applications are built on xulrunner (e.g. Thunderbird). You can also build applications on top of xulrunner.

How does the Mac Web Dash board app work?

Would like to understand how to build a tool like the mac os dash board widget (web clip). Am looking at trying to build it with webkit but not sure if thats the right way to go.
Some thoughts were to using webkit and some DOM to display only the viewport that a user requests.
While this works so well on mac os, am trying to build it on windows with .Net.
Dashboard just uses webkit to display some HTML and JavaScript for the dynamic parts, but there are a couple of extensions. Apple have developer documentation on Dashboard.

Resources