This page explains the preparations required and restrictions in relation to running tests in Safari on a local macOS.
Preparing to run the test
Safari remote automation is disabled by default. Enable remote automation by performing one of the following two operations.
Setting by command
Open the terminal, run the following command, and enter your password.
Depending on how the OS has been upgraded, it may not be possible to enable this using the above command. In such a case, run the following command.
sudo safaridriver --enable
Setting by GUI operation
Launch Safari and select “Preferences” from the “Safari” menu.
When the dialog box opens, click the “Advanced” tab, and check the “Show Develop menu in menu bar.”
Next, open the “Develop” menu, and check the “Allow Remote Automation” checkbox.
There are several restrictions when using Safari on the local PC for MagicPod.
Acquiring new UI captures
You cannot use Safari to capture the new UI. Use Chrome to acquire the capture, and run the test only in Safari. An error may occur if you select Safari as the browser and try to connect to MagicPodDesktop. run the test by clicking the “Run” button directly, without using the “Connect to browser” button.
Manual mouse operations while running the test
When running the test, do not manually operate applications other than Safari. If you do so, there may be times when the “mouse over” operation on Safari will not be run properly.
Manual operations on Safari
Safari windows launched for the purpose of automated tests cannot be operated manually. If you try to operate them in this way, the following dialog box will be displayed. Depending on the purpose, select either “Continue Session” or “Stop Session”.
- Continue the session
- It will return to the automated operation state, and this window can be used for running future tests as well.
- If you accidentally touch this while running the test, you can select this even after the test is complete to continue using this window for tests.
- Suspending the session
- Disables the automatic operation state, and enables it to be operated manually. If you run a new test, this window will close and a new window will open.
- Select if you wish to confirm the operation of this screen after the test is complete.
- Turns all automation off
- If this button is pressed, “Allow remote automation” will be disabled, so you should not click this button.
- If you click it by mistake, redo the “Allowing remote automation” procedure.
Restrictions on individual commands
- Click to download file
- This command cannot be used.
- Text input
- There are restrictions on the UI elements that can be used, and only elements with <input> or <textarea> tag locators can be input.
- If you use tags other than the above or AI locators (locators with the format ai=XX), an error will occur.
- Transition by specifying the URL
- It is not currently possible to transition to sites that use Basic authentication. Please contact the development team if you would like this function to be improved.