Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Download and launch the Selenium installation file onto the machine on which you would like to run the Selenium Agent.

After the installation, the Selenium Agent application will be launched automatically (as a regular application and not as a service).

When you're done installing, Connect Selenium Agents to Cloud Server and Manage Selenium Agents.


Table of Contents

Installation on Mac OS - starting from version 11.9

Starting from version 11.9 - Selenium Agent on Mac requires root privileges - as such you will not be able to upgrade from version <= 11.8 to version >= 11.9 via the cloud UI. You will need to install it directly from the machine.

Important:

During the installation or reboot of the Mac machine, your Mac machine must be connected to a physical screen with a resolution of at least 1920x1080. Otherwise Manual browser functionality will not work properly.

Alternatively, you can connect to the HDMI display output of your mac, a headless adapater simulating a connected 1080p display. Example for such a plug can be found on Amazon.

Before installation:

  1. Go to System preference → Sharing and allow "Screen Sharing" and "Remote Login".
  2. If you have an existing installation of Selenium Agent with version <= 11.8 you will need to uninstall it first.

Installation instructions:

  1. In order to enable Selenium tests on Safari, open Safari application on the Mac machine, Click 'Develop' in the menu bar and check the 'Allow Remote Automation' menu item.

  2. As part of the installation, the installer will create 11 users (experiuser0 ... experiuser10) and will log into each one of them one by one.
    For each of these users, you should press "Continue" => press "Setup Later" => press "Skip".
  3. When logging to the first user (experiuser0), and only to this one, the macOS will display a warning and an additional dialog box:
    1. The dialog box will ask you to open the "System Preferences"->"Security & Privacy".
    2. Select the Privacy Tab and press the Accessibility button on the left side.
    3. Then click the lock to make changes and press Enter.
    4. Make sure the checkbox to the left of "Selenium.sh" entry is checked. If it is unchecked, click to make it checked.
    5. When done press the OK button in the dialog box.
    6. This will continue the process of login to the rest of the user accounts.
  4. When this process is completed, the macOS will switch back to the user who executed the installer. Login with your credentials in order to finish the installation. The Selenium Agent will start automatically.

Machine reboot instructions:

  1. From now on, after each reboot, login to your user (the user that installed the Selenium agent).
  2. The macOS will log in automatically to each of the 10 users (from experiuser1 to experiuser10) without any manual intervention.
  3. Only after all the login processes are completed, the Selenium Agent will be ready.

Highly Recommended:

  1. In order to make your Selenium Agent run automatically after reboot, make sure to set up the mac machine for auto login to the user with which you have installed the Selenium Agent software. To configure this, open the System Preferences application and press the "Users & Groups" button. Then press the "Login Options" and select your username in the Automatic Login drop-down list and continue according to the instructions given by the mac machine.
  2. For security reasons, it is advised to block VNC access to the machine to all users/administrators and allow VNC access only to the user you trust. To configure this, open the "System Preferences" application and press the Sharing button. Then select the "Screen Sharing" checkbox on the left and under "Allow Access for:" remove all entries and then add only the user you trust.

Installation on Windows OS:

  • The user installing the Selenium Agent must have rights to read and write to the Windows registry.
Warning
titleRemote Desktop

We highly recommend NOT to run Selenium Agent via RDP.

In case Selenium Agent is run via RDP, you might get black screenshots in the reports if the RDP session lock screen is activated or disconnected.

To overcome this issue, exit the RDP session after launching the Selenium Agent as follows using the LogoutFromRDP.bat file located on your desktop (run as Admin).

Note
titleWindows 7 Installation
  • We allow opening only one manual browser Windows 7.
  • On Windows 7, After the installation is finished, execute the script at %TMP%\setupRdpConfigForManual.bat with Admin privileges.

Disable popup blocking

Some customers may require to configure the Selenium Agent to have popup blocking disabled.

In order to configure this the following should be done

Windows
1. As admin run command 'reg import C:\Users\<user>\SeleniumAgent\bin\allow-popups.reg' 
2. Add the following line
  lockPref("dom.disable_open_during_load", false);
to the following files:
C:\Users\<user>\SeleniumAgent\bin\experitest.cfg
C:\ProgramData\SeleniumAgent\browsers\<firefox...>\browser\experitest.cfg - for each firefox folder

MacOS
1. As sudo
- cp ~/SeleniumAgent/bin/org.chromium.Chromium.allow_popups.plist /Library/Preferences/org.chromium.Chromium.plist
- killall cfprefsd

2. Add the following line
  lockPref("dom.disable_open_during_load", false);
to the following files:
~/SeleniumAgent/bin/experitest.cfg
~/SeleniumAgent/browsers/<firefox...>/browser/Firefox.app/Contents/Resources/experitest.cfg - for each firefox folder

Troubleshooting

  • Internet Explorer

If you experience problems with Internet Explorer - Follow the instructions below according to the OS version of the machine and the Internet Explorer version installed on the machine:

    1. On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a checkbox at the bottom of the tab labeled "Enable Protected Mode".
    2. Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
    3. The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
    4. For Windows 10, you also need to set "Change the size of text, apps, and other items" to 100% in display settings.
    5. For IE 11 only, you will need to set a registry entry on the machine:
      1. For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE
      2. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE
      3. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.
  • Firefox

If you have Firefox browser installed on the machine, uninstall it.

  • Edge web driver on Windows 10 versions 17763 and above

    if you can't open grid session on edge, navigate to <SELENIUM_INSTALLATION FOLDER>\bin and run updateEdgeWebDriver.bat with admin privileges, then restart Selenium Agent.

  • Manual testing on Windows 10 version 17763

    If you can't open more then 1 manual sessions on your agent - Follow the instructions below:

    Navigate to <SELENIUM_INSTALLATION FOLDER>\install\ and open RDPConf.exe. If your version of Windows is not supported it should look like this:

    Image Added

    Look at the Windows version specified in the conf, in our case its build 292, remember this number:

    Image Added

    Navigate to C:\Program Files\RDP Wrapper\ and open the file rdpwrap.ini in any text editor

    Copy the following lines to the file, above the [SLinit] tag (should be around line 3050):

    Replace <BUILD_NUMBER> with the number you remembered before:

    Code Block
    [10.0.17763.<BUILD_NUMBER>]
    ; Patch CEnforcementCore::GetInstanceOfTSLicense
    LocalOnlyPatch.x86=1
    LocalOnlyOffset.x86=AFAD4
    LocalOnlyCode.x86=jmpshort
    LocalOnlyPatch.x64=1
    LocalOnlyOffset.x64=77A11
    LocalOnlyCode.x64=jmpshort
    ; Patch CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
    SingleUserPatch.x86=1
    SingleUserOffset.x86=4D665
    SingleUserCode.x86=nop
    SingleUserPatch.x64=1
    SingleUserOffset.x64=1322C
    SingleUserCode.x64=Zero
    ; Patch CDefPolicy::Query
    DefPolicyPatch.x86=1
    DefPolicyOffset.x86=4BE69
    DefPolicyCode.x86=CDefPolicy_Query_eax_ecx
    DefPolicyPatch.x64=1
    DefPolicyOffset.x64=17F45
    DefPolicyCode.x64=CDefPolicy_Query_eax_rcx
    ; Hook CSLQuery::Initialize
    SLInitHook.x86=1
    SLInitOffset.x86=5B18A
    SLInitFunc.x86=New_CSLQuery_Initialize
    SLInitHook.x64=1
    SLInitOffset.x64=1ABFC
    SLInitFunc.x64=New_CSLQuery_Initialize

    In the same file, navigate to the end and copy the following lines:

    Again, replace <BUILD_NUMBER> with the number from before:

    Code Block
    [10.0.17763.<BUILD_NUMBER>-SLInit]
    bInitialized.x86 =CD798
    bServerSku.x86 =CD79C
    lMaxUserSessions.x86 =CD7A0
    bAppServerAllowed.x86 =CD7A8
    bRemoteConnAllowed.x86=CD7AC
    bMultimonAllowed.x86 =CD7B0
    ulMaxDebugSessions.x86=CD7B4
    bFUSEnabled.x86 =CD7B8
    bInitialized.x64 =ECAB0
    bServerSku.x64 =ECAB4
    lMaxUserSessions.x64 =ECAB8
    bAppServerAllowed.x64 =ECAC0
    bRemoteConnAllowed.x64=ECAC4
    bMultimonAllowed.x64 =ECAC8
    ulMaxDebugSessions.x64=ECACC
    bFUSEnabled.x64 =ECAD0


    Warning
    IMPORTANT! Make sure you leave 1 blank line in the end of the file.

    Save the changes and restart the machine.

    If all went well, open RDPConf.exe again and it should look like this:

    Image Added


  • Manual testing on Windows machine with Domain Users

    The Selenium Agent installation creates 20 users (experiuser1-experiuser20) for manual sessions. 

    When the selenium agent machine on Windows is connected to a domain, login to the local users may be problematic

    • If login to the local users is allowed but when the agent tries to open RDP session the login is performed to the domain (instead of to the local machine), 

      the solution is to change the value of attribute named manual-username-prefix in config/application.properties file 
      from

      experiuser
      

      to

      .\\experiuser


    • If login to the local users is now allowed and the customer is willing to setup these users (experiuser1-experiuser20) in his domain, we can setup the agent to login to the domain users instead of to the local user.
      the solution is to change the value of attribute named manual-username-prefix in config/application.properties file 
      from

      experiuser
      

      to

      <domain-name>\\experiuser