-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to use any browser with BrowserStack and Appium. #3634
Conversation
Can you add a test for this and fix the current tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep the changes here instead:
nightwatch/lib/transport/factory.js
Lines 67 to 69 in 633f1df
if ((usingAppium || usingBrowserStack) && !browserName) { | |
return browserName; | |
} |
we can remove the check for browserName
from the condition
@gravityvi That would work if for Appium and BrowserStack we do not want to execute this portion of code: |
Yes. We want to achieve the same thing. According to the issue we need to allow any browser name. |
@garg3133 is correct, we should keep that part of the code so that command line arguments can be used. |
This PR allows users to use any browser with BrowserStack, as well as while creating a session with Appium server.
This is because with BrowserStack, we can send any browser name and instead of returning an error it creates a session with Chrome browser as default. And with Appium server, accepted values of
browserName
depends on the driver being used and hence cannot be pre-defined.With selenium server, because we use Selenium's
Builder
class which supports only a few browsers, it will throw an appropriate error for other unsupported browsers instead of just some random error.