Code Monkey home page Code Monkey logo

Comments (6)

SirJerric avatar SirJerric commented on May 26, 2024

While looking into this, I noticed that there are some other incomplete mappings in the codes.

16:52:11.588 [main] WARN  c.intuit.karate.driver.DriverOptions - unknown character / key code: ~
16:52:11.599 [main] WARN  c.intuit.karate.driver.DriverOptions - unknown character / key code: %
16:52:11.600 [main] WARN  c.intuit.karate.driver.DriverOptions - unknown character / key code: ^
16:52:11.623 [main] WARN  c.intuit.karate.driver.DriverOptions - unknown character / key code: |
16:52:11.643 [main] WARN  c.intuit.karate.driver.DriverOptions - unknown character / key code: ?
16:52:11.653 [main] ERROR com.intuit.karate - classpath:ui/test.feature:9
* match value('#testinput') == '`~!@#$%^&*()[]{}|\\;:\'",./<>?'
match failed: EQUALS
  $ | not equal (STRING:STRING)
  '`~!@#$%^&*()]{}|\;:'",./<>?'
  '`~!@#$%^&*()[]{}|\;:'",./<>?'

Despite falling into the else block, these "unknown" key codes are entered into the input successfully.

from karate.

ptrthomas avatar ptrthomas commented on May 26, 2024

tagging as help wanted - PRs welcome

from karate.

SirJerric avatar SirJerric commented on May 26, 2024

Before submitting a Pull Request (PR), please make sure that you have had a discussion with the project-leads

Please proceed with a PR only after the project admins or owners are okay with your approach. We don't want you to spend time and effort working on something - only to find out later that it was not aligned with how the project developers were thinking about it !

I would be happy to contribute if I knew the meaning behind the numbering system, assuming the numbering system is the aligned solution path. It proved challenging to pin down. Possibly due to being assembled across at least three years.

I found one resource that came close to fitting. That resource came with a warning that all such mappings can be hardware-dependent. If these numbers have a specific function elsewhere in the code base I wouldn't want to break that.

My experiments with the develop branch and this lone test case determined that the numbers are arbitrary in the operation under test. Multiple reassignments of the [ key code resulted in a green test.

With multiple solution paths possible, what standard should I pursue? Changing the numbers in Keys.CODES is a simple solution, but is that the aligned approach?

from karate.

SirJerric avatar SirJerric commented on May 26, 2024

If PR #2555 is satisfactory, my employer has allowed access to 1.5.0-RC versions. I do not know what your release versioning policy is, but if we can get it into an easily accessed version, my coworkers and I would be much obliged.

from karate.

SirJerric avatar SirJerric commented on May 26, 2024

Upon further research, It turns out that the issue described in the opening post is not the only way to have an error involving the input method and [. I have not finished pinning down the cause(s), but it can be avoided by adding a \ to the [ before hand-off to WebDriver.input() creates the JSON for the request payload sent to the remote browser (SauceLabs, in my case). Comparing input string, modified input string, logged request payload, screenshot value of input, and expected value for matching the returned actual value, there were four variants of the test string. Most interesting was the evidence that some where in the input-to-request logic the / turned into \/, so someone else already made one escape-character insertion.

Minimal reproduction will be provided when time permits.

from karate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.