Is Firefox Automation on MacOS using NSAccessibility APIs / XCUITest Framework possible? - macos

Can Firefox on MacOS be automated using NSAccessibility APIs or XCUITest framework?
I can access only few buttons of Firefox Window. I want to perform some actions on an alert box, which is from one of the Firefox extension javascript. I have checked using Accessibility inspector as well. However VoiceOver on MacOS can access all the buttons. So I think there is possibly some way to do it.
Any help how to get this working? TIA.Please check Firefox window, which I am trying to automate, here.

Related

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

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

Safari dialoge box is not opening in automaton browser instance

I am automating an application on safari browser using Selenium and Java.
For uploading a file on safari browser, I need to click on upload button.
But the dialog box for selecting a file is not showing in Automation browser instance.
While in regular safari browser (other than automation instance), I can see the dialog box for the same page.
What's the reason for dialog box not opening in safari automation instance?
Its Apple webkit's issue. Reference - https://github.com/SeleniumHQ/selenium/issues/5236
Solution is to either downgrade Safari version and use Selenium's safari driver or wait for Apple webkit to fix this issue.

Can I use Firefox developer toolbar commands in my addon?

I am developing a Firefox addon for making fullpage screenshots of web pages. I know that several good addons that do this are already available, but we have some specific needs so I thought I would try to make my own.
I read that I can do screenshot --fullpage in the Firefox Developer Toolbar. This seems to works well. Can I also call this command from within my addon? If so, how would I go about that?

How exactly do I get the following GUI in a Firefox extension?

I am new to Firefox development and am using the Add-on SDK. I would like to know how to get the following user interface in an extension:
Is this interface a panel? If not, what is it and how do I go about getting this interface in a Firefox addon?
No, this isn't a panel. Your screenshot shows a XUL-based dialog window which is why it looks like a native dialog.
The Add-on SDK uses HTML for its needs however, creating a native-looking dialog is hard there. There is a fork of the Add-on SDK with XUL support but it is outdated and very experimental.
The other option would be building a classic extension. It can simply have a XUL file for the dialog (using <dialog> as root tag) and call window.openDialog() at some point to show it.

Firefox Addon Development

I am getting started with Firefox addon development and have got myself acquainted with the Add-on Builder. Is this wizard all I need to get deep into Firefox addon development (if so, where would I create the XUL files and how would I create a custom toolbar?). Or is it that one cannot implement all features using this Add-on Builder? Also are there any good tutorials which explain how to get started with Firefox addon development using the Add-on Builder (because it seems so much easier).
Tutorials which I already have referred to:
https://developer.mozilla.org/en/Extensions
http://blog.mozilla.org/addons/2009/
But these are not specific to using the Add-on Builder. I would please like someone to point me to where I can find help to develop using the Add-on Builder.
Also if I am developing the addon locally using the SDK is there any good editor which I can use which will show me the list of commands that I can execute (like Eclipse in Java).
The red line is where i want my icon to appear. Is it possible to do it using the addon builder.
There are currently two kinds of Firefox extensions:
Classic extensions use a XUL-based user interface. They can do almost anything but it might take a bit until you see some results with your extension. For documentation on classic add-ons see How do I write a Firefox Addon?
Extensions based on Add-on SDK use HTML for user interface. The SDK provides a simple but limited API. In particular, it explicitly won't let you create toolbars, only single toolbar icons (which makes sense, extensions shouldn't be wasting so much screen space). It won't let you determine the icon placement either - as of Firefox 4 all extension icons are supposed to appear in the add-on bar (the user can customize the toolbars and change the placement however). You can get low-level platform access with chrome authority however. The official Add-on SDK documentation is pretty much all you've got here I think.Edit: Ok, the information on limitations of the Add-on SDK is somewhat outdated. As of Firefox 30, adding toolbars is possible. Also, as of Firefox 29 the icons are placed in the main toolbar by default - the add-on bar is no more. So the only real limitation remaining is the icon placement.
The Add-on Builder is merely a web interface to the SDK - it allows you to edit the extensions conveniently but otherwise it uses Add-on SDK to generate the extensions.
To put an icon directly in the toolbar currently, your best bet is to use Erik Vold's toolbar module ( available in Builder as a package ). here is an example that does that:
https://builder.addons.mozilla.org/addon/1044724/latest/

Resources