Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multiple scenario with multiple session mess up the webdriver configuration #4403

Unanswered
linjin-harvey asked this question in Q&A
Discussion options

Here is my test code:

`Scenario("1", async (I, pages, api, common, date) => {
I.wait(2)
session("customer", browserstack_desktop_configuration, async () => {
I.wait(3)
})
})

Scenario("2", async (I, pages, api, common, date) => {
I.wait(2)
session("customer", browserstack_desktop_configuration, async () => {
I.wait(3)
})
});`

browserstack_desktop_configuration and browserstack_desktop_configuration is global configurations, they have different host and port, like:
browserstack_desktop_configuration: {
host:"a",
port:8080
},
browserstack_desktop_configuration:{
host:"b",
port:80
}
During scenario 1 execution, it using browserstack_desktop_configuration correctly, and start internal 'customer' session with browserstack_desktop_configuration configuration correctly. The tracky is, Before scenario 2 execution, the webdriver configuration change to :
{hostname:"a",
host:"b",
port:80
}, underline webdriverio is using hostname and port to start remote browser, so it throws below error message:
`Can't connect to WebDriver.
Error: Failed to create session.
Unable to connect to "http://a:80/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.

Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible`

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /