This question already has an answer here:
How to get playwrightUrl of Docker container for Playwright (needed to integrate Karate scripts)?
(1 answer)
Closed 1 year ago.
Does anyone have a simple example of launching a browser window in a Karate .feature file using Playwright?
Preferable where the Playwright server is already started. I'm especially not clear on what parameters need to be included in the * configure driver = line.
Instructions are here: https://github.com/karatelabs/karate/tree/master/karate-core#playwright
If already started, you do need to know what the server URL is. Then the driver config would be something like this:
* configure driver = { type: 'playwright', start: false, playwrightUrl: '<change me>' }
It seems that newer versions of Playwright do allow you to set the server URL value to a "known" value when you start the server, see wsPath here: https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server
Playwright support in Karate is still a bit experimental, so if you can report your findings here, that will help others.
Related
This question already has an answer here:
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property-The Similiar doesn't ans
(1 answer)
Closed 4 months ago.
I have added JAR files but I am still getting this error.
ChromeDriver cannot be resolved to a type
enter image description here
You need to set chromedriver path on the system as a variable either manually or through code.
You don't need the jars on the project.
Please look at my reply on the following thread
I cant repeat answers but it's the same situation
This question already has answers here:
karate.callSingle not found .feature file in karate-config.js
(2 answers)
Closed 1 year ago.
I am trying to upgrade Karate from version 0.9.6 to 1.0.0 and started to have some issues with the new JS engine.
01: karate.callSingle('classpath:commons/product/CreateProductTestDataForCurrentTenant.feature')
<<<<
org.graalvm.polyglot.PolyglotException: Multi threaded access requested by thread Thread[pool-1-thread-4,5,main] but is not allowed for language(s) js.
- com.oracle.truffle.polyglot.PolyglotEngineException.illegalState(PolyglotEngineException.java:132)
- com.oracle.truffle.polyglot.PolyglotContextImpl.throwDeniedThreadAccess(PolyglotContextImpl.java:727)
- com.oracle.truffle.polyglot.PolyglotContextImpl.checkAllThreadAccesses(PolyglotContextImpl.java:627)
- com.oracle.truffle.polyglot.PolyglotContextImpl.enterThreadChanged(PolyglotContextImpl.java:526)
- com.oracle.truffle.polyglot.PolyglotEngineImpl.enter(PolyglotEngineImpl.java:1857)
- com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:104)
- org.graalvm.polyglot.Value.canExecute(Value.java:434)
This works with version 0.9.6
Is some additional config missing to making it work? I could not find any mention to it in the upgrade guide.
This is quite likely a bug - and an edge case we had concerns about. We've got one report so far here: https://github.com/intuit/karate/issues/1515#issuecomment-799145191
So it would be tremendously helpful if you can provide a way to replicate, following this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
One recommendation is do not return JS functions in the results of callSingle() try to stick to "pure" data or JSON.
This question already has an answer here:
Unable to use read('classpath:') when running tests with standalone karate.jar
(1 answer)
Closed 1 year ago.
I am trying to use Karate with Visual Studio Code. I have followed the instructions to set up Karate on VSC for Windows, with the robot and Karate Zip. I am able to run the examples in the zip when I run Karate directly. But when I try to debug using VS Code and the standalone jar I keep getting the error that the server cannot start because it times out. I have tried cleaning up VS Code and installing Karate plug in only, Java JRE 1.8 version, disabled the windows 10 firewall. I attach the error screenshots showing debug server timeout. I have tried Karate versions 0.9.6 and 0.9.9RC3 both with the same problem.
[enter image description here][1]
[enter image description here][2]
[enter image description here][3]
[1]: https://i.stack.imgur.com/tTEEM.png
[2]: https://i.stack.imgur.com/bULiN.png
[3]: https://i.stack.imgur.com/69T9T.png
either karate.jar is failing to create target\karate-debug-port.txt file or vscode extension is failing to detect it
check if file was created and/or what may be preventing this file to be created
This question already has an answer here:
Unable to use read('classpath:') when running tests with standalone karate.jar
(1 answer)
Closed 1 year ago.
Visual Studio Code 1.43.0
Karate Standalone JAR 0.9.5.RC5
In the VScode editor, in a Karate .feature file opened, the codelens "Run Karate Test", as shown in the screenshot, isn't displayed anymore.
So, it is impossible to debug a specific scenario.
Any idea about this?
Thanks a lot.
In a correct configuration, it looks like this :
We are still unable to reproduce this issue. Referencing some searches it appears this may be due to a broader issue such as other plugins Eg. Intellisense. Reference to the broader issues https://www.google.com/search?q=vscode+codelens+not+showing
I would recommend trying a clean install with only the Karate Plugin to do some process of elimination. The latest Karate Version is 0.8.1 by the way which it doesn't appear you are using. The Codelens names have changed recently to "Karate: Run" and "Karate: Debug".
Hope this helps.
This question already has answers here:
eclipse error: glassfish\domains\domain1 does not exist
(8 answers)
Closed 6 years ago.
I'm trying to add a Glassfish 4.0 server to an eclipse Spring Tool Suite project (3.6.2).
-Glassfish 4.0 server is running and working (I can see on the localhost console)
-Glassfish for 4.0 are installed in my sts
I have no problem with the first and second panel (server path location), but with the third, I get an error " Specified location is not a valid domain". I don't understand this error, because this is the good location and the good name for my domain (I could verify it with the server log). I've tested with the browse panel and that didn't work too.
So, I'm don't why I get this error.
Thanks
Ps: Sorry I can't post pic
Look at your install directory, find file like this:
C:\tools\glassfish4\glassfish\bin\asadmin.bat
run asadmin.bat, enter command:
create-domain --help
to see document.
create-domain your_domain_name
to create new your_domain_name domain.
Check list domains, use asadmin enter command:
list-domains
Reference: GlassFish Server Documentation. You should also check your GlassFish Tools for Luna inside Spring Tools suite.
You must to add a password to your admin user. Eclipse mistake. Eclipse doesn't recognise the domain without admin password
When you create the domain, add a admin user and a password and Eclipse doesn't complain any more