Safari dialoge box is not opening in automaton browser instance - macos

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.

Related

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

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.

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");

selenium firefox webdriver triggers uninstaller helper.exe to open

OS: Windows 7
Firefox: 37
Selenium-java: 2.45.0
I am able to control firefox with code using selenium library. However, for some reason, besides opening the firefox browser, it always opens firefox unsinstaller (helper.exe) as well, with the message "Installer corrupted: invalid opcode".
Does any one know why firefox uninstaller is even triggered in the first place?
thanks

browser add-on to test mobile design

Are there any add-ons to test an HTML page to see what it will look like on a mobile device? I'm developing with PhoneGap but Eclipse emulator is too slow to refresh it all the time so I want to have a browser extension that make screen resolution like on mobile.
If you care only about the screen size, Firefox 15 (currently Beta, release coming up in two weeks) has Responsive Design View in the Web Developer menu that allows you to adjust "screen size". For example, you can select 360x640 (nHD resolution) and have a look at your page.
However, mobile browsers do custom adjustments to web pages and these adjustments depend on the browser used. For example, Firefox Mobile does something called Font Inflation. You cannot reproduce it in a desktop browser, you have to actually run Firefox Mobile for that. The problem: mobile browsers will only run on mobiles, even Mozilla stopped supplying Firefox Mobile for the desktop after they switched to the native Android UI.
Edit: Starting with Firefox 33, there is a Firefox OS simulator built into Firefox (thanks to Tomek for pointing me into this direction). To start it, open WebIDE, then click "Select Runtime" and choose "Firefox OS 1.3." This will start the simulator, all you need to do then is clicking the Firefox icon (for me it's a blue one, not the usual orange). There you are, you can test any website in a real mobile browser, right on your desktop.
Firefox OS simulator can do the trick: Just install it. Run it - and run the browser inside. :)

Why the set of plugins can be different between Safari and WebView component?

Our Mac desktop application embeds WebView component from WebKit framework.
Inside WebView we host Flash Player where we render UI.
As far as I know, Safari uses WebKit/WebView to display the content.
We were expecting Safari to host the same WebView component our application hosts.
In other words, if Flash plugin is installed in Safari, than Flash will be available in our WebView.
Unfortunately this appeared to be wrong for one of our users.
On his Mac, Flash runs flawlessly in Safari, but our WebView displays "Missing Plugin" message in place of Flash Player.
Mac OS X 10.5.8
Why this can happen?
Is it possible Safari to use a different WebView (or WebView settings) than our application is using?
I would appreciate any advice that would help us to find the source of the problem.
I have asked the user to run a small script that prints a set of plugins installed for Safari and for our WebView.
There are around 20 plugins installed in Safari, including Flash Player.
But there are only 3 plugins installed for our WebView.
Here they are:
Java Plug-In 2 for NPAPI Browsers
Switchable Java Plug-In for WebKit
RealPlayer Plugin.plugin
Pasha
Is it possible Safari to use a different WebView (or WebView settings) than our application is using?
Yes, very much so. A WebView is simply a class, and Safari uses one instance of such a class, which doesn't get modified for a plug-in. The Flash plug-in is installed for the browser (as in, Safari keeps track of where it is installed and looks for it as necessary). Cocoa's WebView doesn't get modified whenever a plug-in is installed—that could lead to all sorts of issues.

Resources