user1453821
user1453821

Reputation: 11

Python 3rd party modules cannot be found in Squish

I am using "Squish for Web 6.3.1" for web application automation testing on Windows 10 platform. Inside the squish testing script, I need to use some 3rd party modules, such as requests, urllib3, etc. I've changed the python installation to my system python not the one embedded in Squish. Squish still cannot find the modules.

I've followed the instruction (https://kb.froglogic.com/display/KB/Changing+the+Python+installation+used+by+Squish+binary+packages) to change the python installation in squish to my external one. I could import 3rd party modules successfully in cmd console .

Upvotes: 1

Views: 2397

Answers (2)

jkulpe
jkulpe

Reputation: 449

I have tried the above, changing the paths.ini as described here https://kb.froglogic.com/squish/howto/changing-python-installation-used-squish-binary-packages/. I could never get it to work - I tried various Squish versions, Python 2, 3, etc.

Its not clean but it worked for me. In your standard python installation perform a

pip install requests

Then copy the {python directory}/Lib/site-packages/requests to {Squish installation directory}/python2/Lib/site-packages. Run your tests, you'll receive import errors. Repeat for all necessary packages.

Edit: The above works for Python 2 with Squish 6.3. For Squish 6.6, using Python3, I followed the steps outlined in this video to perform imports into Squish's python installation https://www.froglogic.com/video-of-the-week/video-using-pip-to-install-external-python-modules/

Upvotes: 0

Danylo Zhydyk
Danylo Zhydyk

Reputation: 11

Looks like you are using standard python provided with squish.

You should change it in : \Squish\etc\paths.ini

Best

Upvotes: 1

Related Questions