-1

The browser does not initialize and throws the error

"WebDriver has not been found for this thread.Please verify you are using the correct WebDriverProvide with the appropriate credentials if using remote access e.g. to SauceLabs: -DSAUCE_USERNAME=xxxxxx-DSAUCE_ACCESS_KEY=xxx-xxxx-xxxx-xxxx-xxx ");

Code used is :

private ChromeWebDriverProvider driverProvider = null;

boolean headless = prop.getProperty("browser.headless")==null?false:Boolean.parseBoolean(props.getProperty(browser.headless).toString())

System.setProperty("webdriver.chrome.provider","chrome.exe path")
this.driverProvider=newChromeWebDriverProvider(headless);
this.lifecyclesteps=new PerstoriesWebDriverSteps(driverProvider) // code fails at this step

It does not return the webdriver instance

I want the browser to be initialized by using PerStoriesWebDriverStpes

Diksha Baluja
  • 81
  • 2
  • 10
  • The browser got initialized by using if (lifecycleSteps instanceof PerStoriesWebDriverSteps) { Embedder embedder = configuredEmbedder(); embedder.useExecutorService(new SameThreadExecutors() But still, it keeps executing the first step of the story equal to the number of records in the corresponding table file – Diksha Baluja Sep 10 '19 at 16:06

1 Answers1

0

The browser got initialized by using if (lifecycleSteps instanceof PerStoriesWebDriverSteps) { Embedder embedder = configuredEmbedder(); embedder.useExecutorService(new SameThreadExecutors() and I was able to execute two stories on the same browser

Diksha Baluja
  • 81
  • 2
  • 10