-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karate UI - javascript error: Unexpected token #2665
Comments
at the very least kindly provide a way to replicate anyway, I think using locators with parantheses and the use of to reopen, follow this process: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue even better please try to contribute code or a PR, or influence your team / org to do so |
This example may not be the exact replica, but we can use this as an example. Here scenario: assumption is the last link name is dynamically changing. Sample Website: http://the-internet.herokuapp.com/
|
reopening, but marked as |
Could you please suggest where I should start/check to work on this issue? |
You have a syntax error. Get rid of the extra parenthesis. Given driver "http://the-internet.herokuapp.com/" or CSS selector Notice I have included the a tag because that is the actual link to click on, but if you need to click on that location vs the specific element you can move.click() For the -And click(ele[size])- way
If you really want parenthesis you could do this: X-Path needs to start with "/","./", or "../"
|
Hi @CPogX Yes, this throws an exception when using parentheses. However, there are scenarios where parentheses must be used, and they work in other frameworks. We need a fix in Karate. Example: |
I believe there is already a built in solution for this by using the / before the parenthesis to indicate xpath: "/(//div[@data-testid='continue'])[2]", but I raised a PR. |
Hi @ptrthomas Using Karate UI: Getting Below error While clicking or mouse-clicking on an element. When I try to locate the xpath in the application, it's pointing to the expected element. but when I try to execute, I'm getting the below error. Could you please suggest how to fix this type of exceptions?
The text was updated successfully, but these errors were encountered: