Comments (7)
tagging this as help wanted. personally I feel workarounds are fine, refer: https://stackoverflow.com/a/61393515/143475
from karate.
Thanks @ptrthomas for the response. The problem with Robot workaround is, it only works if file exists on the host where tests are executing. We execute our test suite on Saucelab from the pipeline. Currently as a workaround, we are using RemoteWebDriver's hidden API to post attachement to the remote host and then upload file from remote host location. I did cloned Karate code today and was able to make file upload working for both WebDriver and DevToolsDriver.
from karate.
@djasani yes if you can submit a PR, that would be the best option
from karate.
@ptrthomas After finishing my implementation I realized that you have already implemented this feature for DevToolsDriver. It's has been implemented in the method "inputFile". I did not find similar method for WebDriver and PlaywrightDriver so I will implement and create PR after that.
Somehow I am not able to run using PlaywrightDriver from Karate-Core. It opens Chromium but just keeps waiting after WebSocket connection is established. However I am able to make it work for Playwright Driver in Karate-Playwright module.
from karate.
@ptrthomas I have executed LocalParallelRunner, PlaywrightRunner and LocalSingleRunner (chromedriver) after my changes. Previously we were only performing file upload when browserType was only Chrome. I have commented following line in the feature file 08.feature so file upload occurs for all different browserType.
#* if (driverType != 'chrome') karate.abort()
I also had to refactor 09.feature file to make this run in playwright. I believe playwright is handling frames differently.
Please find attached here are the results for karate-e2e-tests
karate-reports-LocalParallelRunner.zip
karate-reports-PlaywrightRunner.zip
karate-reports-chromedriver-LocalSingleRunner.zip
from karate.
@djasani thanks ! I'm a little extra busy at the moment so will request if @f-delahaye can take a look
from karate.
@ptrthomas Will do.
@djasani out of curiosity, any idea what was not working/was changed in 09.feature for Playwright?
from karate.
Related Issues (20)
- Missing header in spite of "configure headers" HOT 5
- afterScenario hook not running when scenario fails HOT 1
- Karate does not work with Java 22 (?) => OK with Java 21 HOT 6
- Bug: Calling scenario with array argument of different object leads to unwanted behaviour HOT 1
- The switch from the iframe to the sub-iframe is not working HOT 1
- Chrome is not working from jenkins and getting driver config / start failed: start failed, options: {type=chrome, showDriverLog=true, addOptions=["--remote-allow-origins=*"], target=null} HOT 1
- replace graal with karate-js engine HOT 27
- Variables are lost after callonce java.lang.Thread.sleep() HOT 1
- [Improvement] Rename "request" keyword ? HOT 1
- Multiarch image for karatelabs/karate-chrome HOT 1
- getting this exception org.graalvm.polyglot.PolyglotException: not found: src/test/resources/payload/user.json in Karate HOT 2
- In Karate 1.2.0.RC1, the karate property set in karate-config.js file is coming as null when fetched in a Java File HOT 1
- Karate - Setting header for the subsequent calls on the same scenario is not working after updating to 1.x.x HOT 1
- Driver input method cannot type '[' HOT 6
- The request "path" can not be overwrited in mock.feature
- CRC of file being uploaded HOT 1
- MockServer/MockHandler performance HOT 1
- Doubt regarding afterScenario and afterFeature HOT 1
- I am not able to switch to new window from parent window. Switch page is not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karate.