RedwoodHQ Python version

505 views
Skip to first unread message

tangjie...@gmail.com

unread,
Jan 27, 2016, 4:14:06 PM1/27/16
to PrimaTest Automation
I am currently doing some exercise to merge my automation framework to the RedwoodHQ since it could facilitate my testers to create more tests.
However I got a problem when I was trying to create some python scripts. I could build the scripts successfully, but when I came to add new action and wanted to select the script I created, I found the scripts could not be selected.
After some debugging, it turns out the RedwoodHQ is using python2 as the vendor while my scripts are coded with python3.
I am wondering whether there is any trick that I could use to update the python vendor part of RedwoodHQ on my machine.
Any other suggestions are welcome.
A piece of my test code is as followed:


from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities


class Browser:
def run(self,params):
driver = webdriver.Remote(
command_executor="http://localhost:4444/wd/hub",
desired_capabilities=DesiredCapabilities.CHROME
)
driver.maximize_window()
driver.implicitly_wait(10)

dmolch...@mobileiron.com

unread,
Jan 27, 2016, 4:40:13 PM1/27/16
to PrimaTest Automation, tangjie...@gmail.com

You can try and place whatever version of python you want in vendor dir. You would need to do the same on agent side. We officially don't support Python 3 yet so you might see some unexpected errors.

Dmitri

tangjie...@gmail.com

unread,
Jan 27, 2016, 4:53:23 PM1/27/16
to PrimaTest Automation, tangjie...@gmail.com, dmolch...@mobileiron.com

Thanks a lot for the quick response.
I truly got some errors when I placed the python 3 into the vendor folder. Anyway I will keep update if I got it work.
I am just curious whether there is any chance the Python 3 support will come into the next few release.

sayali...@wct-inc.com

unread,
Dec 2, 2016, 7:44:15 AM12/2/16
to PrimaTest Automation, tangjie...@gmail.com, dmolch...@mobileiron.com
I am executing a python test script in redwoodhq 2.5 version. I am getting a problem while selecting a script while creating a test case. and my python script is build successfully. while selecting a script , the python script is not getting selected.

My code is written in python2 version only and vendor version is also the same.

What can be solution for this?

Here is my piece of code.

from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

class NewSearch:
def run(self,params):
driver = webdriver.Firefox()
driver.get("http://www.amazon.com/")
inputElement = driver.find_element_by_name(q)
inputElement.send_keys("indiana jones blu ray")
inputElement.submit()
pass

dmi...@primatest.net

unread,
Dec 2, 2016, 12:05:04 PM12/2/16
to PrimaTest Automation, tangjie...@gmail.com, dmolch...@mobileiron.com, sayali...@wct-inc.com

You need to make sure that you actually have selenium libraries available. Open scripts tab, open PipRequirements file and add selenium or any other libraries you might need.

AutoApp

unread,
Jan 31, 2017, 1:53:51 AM1/31/17
to PrimaTest Automation, tangjie...@gmail.com, dmolch...@mobileiron.com, sayali...@wct-inc.com

Hello All,

I am facing same issue with python script. Not able to select it. 
Could you please let me know how you have resolved the issue? What details are we supposed to add in PipRequirements file?

Many thanks in Advance!

dmi...@primatest.net

unread,
Feb 3, 2017, 2:52:10 PM2/3/17
to PrimaTest Automation, tangjie...@gmail.com, dmolch...@mobileiron.com, sayali...@wct-inc.com
PipRequirements file needs to have your external libraries like selenium etc.
Reply all
Reply to author
Forward
0 new messages