I am working on a project that involves using the Selenium WebDriver and a specific Firefox Profile heavily to find elements and manage the page.
For example,
driver.findElement(By.xpath("//*[@id='foobar']"));
and
driver.manage().refresh();
I am trying to implement Selenium Grid into my project; however, with the extensive use of Selenium WebDriver, is there a way to start the ThreadSafeSeleniumSessionStorage.session() static object with a specific WebDriver?
As far as I have researched, it is possible to get the WebDriver from the Selenium object by:
startSeleniumSession(seleniumHost, seleniumPort, browser, webSite); //Create and start the session() object
//TODO: insert a specific WebDriver into the session() object
WebDriver driver = ((WebDriverBackedSelenium) session()).getWrappedDriver(); //Get the WebDriver from the session() object