1

We are using docker in our CI process. I want to initiate 'RemoteWebDriver' in docker container for chrome. IS it possible doing this using karate framework?

  • As of now there is no built-in support, but you can try using the instructions here: https://github.com/intuit/karate/tree/develop/karate-core#custom-target – Peter Thomas Oct 02 '19 at 15:03

1 Answers1

1

As of now there is no built-in support, but you can try using the instructions here: https://github.com/intuit/karate/tree/develop/karate-core#custom-target

EDIT: this is supported in 0.9.5

Docs: https://github.com/intuit/karate/tree/master/karate-core#webdriversession

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • I pulled your develop branch and build locally. I'm trying to run the UI feature demo-01.feature but for some reason my getting runner exception as below. I'm pointing to mvn 0.9.5.RC1 *** runner exception stack trace *** java.nio.file.InvalidPathException: Illegal char <:> at index 9: classpath:demo/abort/abort.feature at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) – Umesh bardale Aug 30 '19 at 15:25
  • When i try to run UI test in docker Feature: browser automation Background: * configure driverTarget = { docker: 'justinribeiro/chrome-headless', showdriverTargetTargetLog: true} Scenario: try to login to github and then do a google search Given driverTarget 'https://github.com/login' And driverTarget.input('#login_field', 'hello') And driverTarget.input('#password', 'world') I'm getting error as no step-definition method match found for: driverTarget 'https://github.com/login' – Umesh bardale Sep 03 '19 at 18:42
  • Sorry for confusion actually I'm referring demo01.feature from demo under developer branch. I'm trying to set drivertarget using docker as per the example1 as * configure driverTarget = { docker: 'justinribeiro/chrome-headless', showDriverLog: true } . on windows 10 machine. I'm running Docker images justinribeiro/chrome-headless on my local docker instance. So problem is my test is failing opening browser at below step Given driver 'https://github.com/login' with error message as no step-definition method match found for: driverTarget 'https://github.com/login' – Umesh bardale Sep 04 '19 at 13:55
  • @PeterThomas I hear you but your example on that link is chrome docker only. How would you do IE11, for example? Can you provide that info in your release notes? – djangofan Dec 11 '19 at 01:00
  • @djangofan I would like to know what in the docs made you jump to the conclusion that karate is a drop-in replacement for “Grid” whatever that is. oh and this is open source, so please submit a PR :) – Peter Thomas Dec 11 '19 at 02:19
  • @PeterThomas That isn't what I was saying: I am saying that Karate should provide the option to communicate with a 'Selenium RemoteWebDriver' instance, similar to how Karate can currently talk to a local ChromeDriver. Am I overlooking it? Your karate-core documentation does not mention it anywhere. – djangofan Dec 13 '19 at 17:20
  • @djangofan karate supports the w3c webdriver protocol so it should most likely support `RemoteWebDriver` already as-is but to be honest we have not had the time to try this and document it. maybe you can help ? hint: open source :) – Peter Thomas Dec 13 '19 at 18:02
  • 1
    Ok, I will try it. – djangofan Dec 18 '19 at 02:38
  • 1
    Works now in 0.9.5 . Thanks Peter! – djangofan Mar 03 '20 at 16:34
  • @djangofan thanks for reminding me, I edited the answer with this info – Peter Thomas Mar 03 '20 at 17:32