0

I'm trying to do cross browser test with selenium grid and when I typing webdrive.Remote(command_executor, desired_capabilities) it shows me that desired_capabilities is Unexpected argument and when i run my test it's give my a TypeError: init() got an unexpected keyword argument 'desired_capabilities'

Here is my fixture:

@pytest.fixture(params=["chrome", "firefox", "edge"]) def driver_initialization(request): """ Initiate Driver for Selenium Grid on LambdaTest :param request: """

desired_caps = {}
if request.param == "chrome":
    desired_caps.update(chrome_cap)
    driver = webdriver.Remote(
        command_executor=RemoteConnection(remote_url),
        desired_capabilities={"LT: Options": desired_caps} #yelow highlight with "Unexpected argument" warning
    )
elif request.param == "firefox":
    desired_caps.update(firefox_cap)
    driver = webdriver.Remote(
        command_executor=RemoteConnection(remote_url),
        desired_capabilities={"LT: Options": desired_caps} #yelow highlight with "Unexpected argument" warning
    )
elif request.param == "edge":
    desired_caps.update(edge_cap)
    driver = webdriver.Remote(
        command_executor=RemoteConnection(remote_url),
        desired_capabilities={"LT: Options": desired_caps} #yelow highlight with "Unexpected argument" warning
    )
request.cls.driver = driver
yield
driver.close()

Can anyone helm me with that? Thank you all in advance!

Leanid
  • 1
  • 2

0 Answers0