We are using Selenium with Java to automate our Web application. We have working code to run automated test scripts on Windows operating system for the three browsers (IE, Chrome, Firefox - Latest version).
Download latest released version for Chrome or for Firefox or view the Release Notes. SafariDriver is supported directly by Apple, for more information, check their. Microsoft is implementing and maintaining the Microsoft Edge WebDriver, please refer to their documentation for any compatibility information + Operating Systems. Watir-WebDriver supports Safari thanks to the release of SafariDriver. The downside is the set up is quite lengthy at the moment as it requires a Safari extension (version 5+) and until someone publishes the extension to the online gallery, you'll have to build it yourself.
We have got the requirement to run automated test scripts on MAC operating system - Safari browser.
How to launch Safari Browser with Selenium: Steps: 1 – Set Up WebDriver Extension for Safari browser 2 - Install the Safari Browser Extension 3 - Restart y.
Environment Details:
Chrome apk download for pc apkpure. MAC OS version : macOS Sierra version 10.12.5
Safari browser version : 10.1.1(12603.2.4)
Adobe cc 2020 mac download. Selenium standalone server version : 3.4.0
Java version : 1.8.0_112
Connected MAC VM with VNC viewer (Sys admin team provided MAC VM for our testing).
https://songentrancement.weebly.com/blog/autodesk-2020-for-mac-download. While executing test scripts on MAC, below code is not maximizing Safari browser, which is working fine for other browsers(IE, Chrome and Firefox) on Windows. Due to this we are unable to locate some of the controls on application.
We are not getting any exception, code is executing but not performing any action.
Please help to overcome Safari browser maximize issue on MAC.
Really I thought my issue got resolved with this solution, tried code to maximize Safari browser, but getting exception.
Code:
Exception:
Aug 07, 2017 3:11:53 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS Exception in thread 'main' org.openqa.selenium.NoSuchWindowException: A request to use a window could not be satisfied because the window could not be found. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 27 milliseconds Build info: version: '3.4.0', revision: '5234b32', time: '2017-03-10 09:04:52 -0800' System info: host: 'Mac.local', ip: 'fe80:0:0:0:4c6:11dc:3f91:11f8%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_121' Driver info: org.openqa.selenium.safari.SafariDriver Capabilities [{applicationCacheEnabled=true, rotatable=false, databaseEnabled=true, handlesAlerts=true, version=12603.3.8, cleanSession=true, platform=MAC, nativeEvents=true, locationContextEnabled=false, webStorageEnabled=true, browserName=safari, javascriptEnabled=true, platformName=macOS, cssSelectorsEnabled=true}] Session ID: BA265536-18D3-490E-B6DB-40D8BBF25937 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638) at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.setSize(RemoteWebDriver.java:860) at Sample.Safari.main(Safari.java:20)
Installation and usageMicrosoft Edge
Microsoft Edge Legacy
Go to Settings > Update and Security > For Developer and then select “Developer mode”.
For Microsoft Edge Legacy builds prior to 18, install a previous release of WebDriver:
Downloads
By downloading and using this software, you agree to the license terms below.
Firefox Webdriver Download For Selenium
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |