Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium Remote Webdriver with remote profile

Is it possible to open a Selenium Remote Webdriver with a specific remote profile (not temporary) in the server?

I have only been able to pass a browser_profile from the client. If I instantiate the class without browser_profile Selenium creates a new temporary profile in the server.

from selenium import webdriver

class Remote(webdriver.Remote):
    def __init__(self, **kwargs):
        capabilities = {_**whatever_}

        super().__init__(
            command_executor='http://HOST:PORT/wd/hub',
            desired_capabilities=capabilities.copy(),
            browser_profile=webdriver.FirefoxProfile(_what?_)
        )
like image 838
Nuno André Avatar asked Oct 27 '16 18:10

Nuno André


People also ask

Can we use RemoteWebDriver instead of WebDriver?

Selenium RemoteWebDriver : Difference between WebDriver and RemoteWebDriver. Selenium Webdriver is a tool used to execute automated test cases on various browsers. The object of the WebDriver is a browser. Selenium RemoteWebDriver implements the WebDriver interface to execute test cases.

Can we use RemoteWebDriver driver new ChromeDriver?

This driver instance has access to almost all the methods of WebDriver. This happens because every browser extends RemoteWebDriver and RemoteWebDriver implements WebDriver interface. We can still use those methods whenever it required for execution on respective browser only.

What is the use of RemoteWebDriver?

Selenium RemoteWebDriver is used to execute the browser automation suite on a remote machine. In other words, RemoteWebDriver is a class that implements the WebDriver interface on the remote server. The browser driver classes like FirefoxDriver, ChromeDriver, InternetExplorerDriver, etc.


1 Answers

No, it is not possible to pass path of remote profile in case of remote webdriver. The reason being that all remote communication is handled by command executor. Where as browser profile is dealing with local file system only. Though default profile can be configured on server.

like image 87
Falloutcoder Avatar answered Oct 04 '22 20:10

Falloutcoder