Actually i am looking to integrate browserstack with Karate for UI automation. If its possible or anyone tried then let me know the inputs.
Asked
Active
Viewed 902 times
1 Answers
0
Refer the webDriverSession
in the docs: https://github.com/intuit/karate/tree/develop/karate-core#webdriversession
Example:
* def session = { capabilities: { browserName: 'chrome' }, desiredCapabilities: { browserName: 'chrome' } }
* configure driver = { type: 'chromedriver', webDriverSession: '#(session)', start: false, webDriverUrl: 'http://localhost:9515/wd/hub' }

Peter Thomas
- 54,465
- 21
- 84
- 248
-
Do i need to add this in feature file? If yes then how to call it in .java file? – Bhanu Agarwal Aug 14 '20 at 12:35
-
@BhanuAgarwal yes please read the docs. there is also an advanced example here using AWS DeviceFarm: https://github.com/ptrthomas/karate-devicefarm-demo – Peter Thomas Aug 14 '20 at 12:36
-
Still not getting how to add above one in java. Above one is json and i am looking like adding capabilities in .java file – Bhanu Agarwal Aug 14 '20 at 13:08
-
@BhanuAgarwal I give up. maybe someone else can help you, all the best – Peter Thomas Aug 14 '20 at 13:16
-
I added capabilities in map but not getting idea where to add this map. Even its doing handshake as well with browserstack (connection getting established). – Bhanu Agarwal Aug 14 '20 at 13:17
-
@BhanuAgarwal best of luck. you need it :) – Peter Thomas Aug 14 '20 at 13:18