Can I control another app from my macOS app? - macos

I'm looking to control another app from my macOS app.
I want to
check tab' URL in a browser (Safari, Chrome)
change tab' URL from my app
I noticed an app got Automation permission.

Use AppleScript to get and control browsers and other apps.
AppleScript can get the URLs a browser have been opened and change the tab's URL to what you want.

Related

Not able to handle windows authentication window using Appium in safari browser

We are automating our website using Appium in Mac iOS device .
when we access our application, it shows windows authentication pop up window. we used the format(https;//username:password#test.com) to handle the windows popup window in chrome and Firefox browser and it is working fine . but windows authentication popup window is appearing in safari browser. could you please let us know how we can handle windows popup window in safari browser
my system configuration
Mac OS version 10.14.5(macOS Mojave)
Appium version 1.14.2
iPhone version 12.4
What does the windows popup in Safari browser look like? If it's a standard login form with username / password inputs, you may need to locate the username / password textfield elements & call SendKeys.
I recommend using the Appium inspector to reproduce your scenario & inspect the Safari browser there.
I have faced a similar issue when handling my organization's single sign on page. After logging in & automatically closing the sign on browser page, my AppiumDriver context became stale & stopped working. so I had to call Driver.BackgroundApp(); to fix it.
If the username / password input is an 'Alert' style popup, you can refer to this forum here which has a few workarounds:
https://discuss.appium.io/t/handle-http-authentication-on-ios-safari/1480/7
Thank you so much for replying my question .
the below code is working perfectly
driver.get("https://test.com");
driver.context("NATIVE_APP");
driver.findElement(By.Xpath("uname"));
driver.findElement(By.Xpath("pwd"));
driver.findElement(By.Xpath("login"));
driver.context("WEB_VIEW");

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.

iOS 8 Extension

In iOS 8 is it possible to invoke extension menu from a button on website (i.e. using javascript) in safari ?
I am able to invoke the extension menu from a password field in one of my iOS APP. Like in image below.
http://blog.agilebits.com/wp-content/uploads/2014/09/Instapaper-1Password-extension.png
I want to do the same when i open my website in safari. So when user selects 1Password button from website page it should open this menu or share menu with 1Password extension. Not that user go and select share menu then 1Password.
This is not possible in Safari currently. What you are seeing in the Instapaper application is only possible using iOS SDK.
If you write a thin app around your website, this is also possible. You can signal from Javascript to your app that you want the activity used, and when the user finished, signal your website the information with Javascript.

Launch an app from within browser within Windows Mango Browser

I'm trying to do what is simple in iOS, redirect from the browser to my app (I am authenticating via a website which then loads the url that switches back to my app via appreferencename:/) in Mango.
Is there a way to switch to an app from a browser via a link?
Thanks!
It's not possible, unfortunately. You are able to link to a marketplace page, but that's only useful if you want to download or update an app.
Open Windows Phone 7 App from URL

Mac App Store app with Safari Extension

I'm trying to understand how an app like 1Password can be on the Mac App Store and come with a Safari extension (and most importantly, how can the extension communicate with the app) because I'd like to do the same.
Is the native app running a server as a subprocess that get's called by the safari extension?
I'd like to know if it's possible to do that and still be Mac App Store + Sandboxing friendly.
1Password uses an agent to communicate between the Mac App and the Safari Extension. The agent is most likely a small server process that can receive RESTful calls from the extension(s). This mechanism allows the synchronization between all the different extensions (Safari, Chrome, Firefox, etc), the client and the main database.
The Safari extension is no longer installed directly by the 1Password app, by the way. Instead, you are directed to a web page that contains the Safari extension download, thus making the App sandbox-friendly.
I believe it's a regular .app that has a Safari extension inside it as a resource.
The app will check for the existence of the Safari extension on application launch, and if it doesn't find it in the default locations it will prompt the user to install it. If the users chooses to install it, the app copies the extensions to the Safari extensions folder.

Resources