VMware Horizon Community
Swatidt
Contributor
Contributor
Jump to solution

Unable to launch browser while running selenium test on VDI

Hello Eveyone,

I am unable to launch chrome browser using Robot automation framework and Selenium Libraries

Reply
0 Kudos
2 Solutions

Accepted Solutions
Swatidt
Contributor
Contributor
Jump to solution

Hello, thanks for replying!

Here are the details:

OS : Windows10

Automation Framwork : Robot

Code base : Python

Libraries : Selenium

Environment : VMWare Horizon client

Steps:

Step 1 : Pre-check
Check if python is already installed
python --version
pip --version
Check if robot framework is already installed
robot --version

Save "Chromedriver.exe"  exactly same version as that of your chrome browser and update System environment variable with the said path

Step 2 : Install Python version 2.7.13


Step 3 : Set Python in environment variables 
C:\Python27;
C:\Python27\Scripts;

Step 4 : Install robot framework 
pip install robotframework

Step 5 : Check on cmd
robot --version

Step 6 : PIP install robotframework-seleniumlibrary ( version 3.3.1)

Step 7 : Download and install wxPython -
https://sourceforge.net/projects/wxpython/files/wxpython/files/wxPython/2.8.12.1/

Step 8 : Open CMD check with > pip freeze or PIP list
wxpython should be available in the list displyed

Once setup is done:

  1. Open CMD >> run command >> PIP install robotframework-RIDE (Click "Yes" to create desktop shortcut)
  2. Close CMD
  3. Now relaunch CMD run command : ride.py (This should launch RIDE editor

Creating first sample Script:

  1. Create new project
  2. Import Selenium Library
  3. Now create new test inside that project
  4. Paste below code in "Text Edit" section of RIDE

PS : Ensure press tab after writting Open Browser and post writting the url

*** Settings ***
Documentation Test case to launch the web browser with a specific URL
Library Selenium2Library #Documentation Validate login

*** Test Cases ***
Launch Web Browser with URL.py
Open Browser       https://www.google.com/        chrome

 

Expected : It should launch the browser with the url passed as an attribute

Actual : It is launching the blank browser (with no url)

View solution in original post

Reply
0 Kudos
Swatidt
Contributor
Contributor
Jump to solution

Once setup is done:

  1. Open CMD >> run command >> PIP install robotframework-RIDE (Click "Yes" to create desktop shortcut)
  2. Close CMD
  3. Now relaunch CMD run command : ride.py (This should launch RIDE editor

Creating first sample Script:

  1. Create new project
  2. Import Selenium Library
  3. Now create new test inside that project
  4. Paste below code in "Text Edit" section of RIDE

PS : Ensure press tab after writting Open Browser and post writting the url

*** Settings ***
Documentation Test case to launch the web browser with a specific URL
Library Selenium2Library #Documentation Validate login

*** Test Cases ***
Launch Web Browser with URL.py
Open Browser       https://www.google.com/        chrome

 

Expected : It should launch the browser with the url passed as an attribute

Actual : It is launching the blank browser (with no url)

 

 

 

View solution in original post

Reply
0 Kudos
3 Replies
yukiafronia
Enthusiast
Enthusiast
Jump to solution

Hi,

Is the deployed VDI Linux? Please detail the OS and OS version.

Also, please share the steps to launch the browser using selenium in the virtual machine. That way, volunteers may be able to prepare a reproducible environment.

Also, are you a full clone? Instant clone?

Reply
0 Kudos
Swatidt
Contributor
Contributor
Jump to solution

Hello, thanks for replying!

Here are the details:

OS : Windows10

Automation Framwork : Robot

Code base : Python

Libraries : Selenium

Environment : VMWare Horizon client

Steps:

Step 1 : Pre-check
Check if python is already installed
python --version
pip --version
Check if robot framework is already installed
robot --version

Save "Chromedriver.exe"  exactly same version as that of your chrome browser and update System environment variable with the said path

Step 2 : Install Python version 2.7.13


Step 3 : Set Python in environment variables 
C:\Python27;
C:\Python27\Scripts;

Step 4 : Install robot framework 
pip install robotframework

Step 5 : Check on cmd
robot --version

Step 6 : PIP install robotframework-seleniumlibrary ( version 3.3.1)

Step 7 : Download and install wxPython -
https://sourceforge.net/projects/wxpython/files/wxpython/files/wxPython/2.8.12.1/

Step 8 : Open CMD check with > pip freeze or PIP list
wxpython should be available in the list displyed

Once setup is done:

  1. Open CMD >> run command >> PIP install robotframework-RIDE (Click "Yes" to create desktop shortcut)
  2. Close CMD
  3. Now relaunch CMD run command : ride.py (This should launch RIDE editor

Creating first sample Script:

  1. Create new project
  2. Import Selenium Library
  3. Now create new test inside that project
  4. Paste below code in "Text Edit" section of RIDE

PS : Ensure press tab after writting Open Browser and post writting the url

*** Settings ***
Documentation Test case to launch the web browser with a specific URL
Library Selenium2Library #Documentation Validate login

*** Test Cases ***
Launch Web Browser with URL.py
Open Browser       https://www.google.com/        chrome

 

Expected : It should launch the browser with the url passed as an attribute

Actual : It is launching the blank browser (with no url)

Reply
0 Kudos
Swatidt
Contributor
Contributor
Jump to solution

Once setup is done:

  1. Open CMD >> run command >> PIP install robotframework-RIDE (Click "Yes" to create desktop shortcut)
  2. Close CMD
  3. Now relaunch CMD run command : ride.py (This should launch RIDE editor

Creating first sample Script:

  1. Create new project
  2. Import Selenium Library
  3. Now create new test inside that project
  4. Paste below code in "Text Edit" section of RIDE

PS : Ensure press tab after writting Open Browser and post writting the url

*** Settings ***
Documentation Test case to launch the web browser with a specific URL
Library Selenium2Library #Documentation Validate login

*** Test Cases ***
Launch Web Browser with URL.py
Open Browser       https://www.google.com/        chrome

 

Expected : It should launch the browser with the url passed as an attribute

Actual : It is launching the blank browser (with no url)

 

 

 

Reply
0 Kudos