21 lines
612 B
Python
21 lines
612 B
Python
|
#!/usr/bin/python
|
||
|
|
||
|
# Necessary imports
|
||
|
from selenium import webdriver
|
||
|
from robot.api.logger import info
|
||
|
|
||
|
|
||
|
def setup_webdriver(remote_url):
|
||
|
# Set up webdriver and necessary variables for later
|
||
|
chrome_options = webdriver.ChromeOptions()
|
||
|
info('Attempting to establish connection to remote webdriver...')
|
||
|
# driver = webdriver.Remote(
|
||
|
# command_executor=remote_url, options=chrome_options)
|
||
|
# info('Connection established.')
|
||
|
return webdriver.Remote(command_executor=remote_url, options=chrome_options)
|
||
|
|
||
|
|
||
|
def get_variables(url):
|
||
|
var = {"DRIVER": setup_webdriver(url)}
|
||
|
return var
|