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)
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
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.
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
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.