I'm using JSdoc 3.3.3 to generate documentation.
I got the below error message:
Generating output files...org.mozilla.javascript.EcmaError: SyntaxError: Unterminated parenthetical (<eval'ed string>#1(Function)#201(Function)#53(Function)#17)
I have no clue of where to start looking for that is causing this. I need help to understanding the error message.
/**
* Changes the caption (title) of the window or a widget.
*
* #param (XsString|XsChar|String|string}
* widgetName - The name of the widget.
* #param {XsString|XsChar|String|string}
* caption - The new caption.
*/
The problem is start parenthesis. That should be a curly bracket at the first #param.
Related
I am trying to enter a random string in text box using the input(“X-path”,’#(name)’). Script is failing with invalid syntax .
Can anyone help me with the correct syntax
Here is the working sample script created for POC
Feature: create order
Background
def now=function(){return java.lang.System.currentTimeMills()}
*def ordername='order'+now()
Scenario: Create random order
Given call read('login.feature')
Given driver 'url to navigate to another page'
And click('#selector')
And input("x-path",ordername)
I think you missed the fact that variables can be used "as is" in JS functions.
* def name = 'foo'
* input('/some/path', name)
The '#(name)' syntax is only for JSON: https://github.com/karatelabs/karate#rules-for-embedded-expressions
KarateUI question
I'm trying to enter values in a text field using a variable. Example:
* def foo = bar
* waitFor("input[aria-label='Search Input']").input('<foo>' + Key.ENTER)
This results in value being entered in the Search Input field.
I have been using the '<[something]>' successfully on a number of other places, not sure why it's not working in the above example.
I have tried a number of other approaches following the documentation without much luck.
Karate "variables" can be mixed into plain JavaScript. So try this:
* def foo = 'bar'
* waitFor("input[aria-label='Search Input']").input(foo + Key.ENTER)
That's right, no angle-brackets required.
Also see: https://github.com/karatelabs/karate#scenario-outline-enhancements
If still stuck, follow this process please: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue
I have a question regarding IntelliJ's comment folding.
I have the following comment:
/**
* compileNews() converts the text of TextCompiler.soundAlarm() to audio as speech.mp3
*
* #throws Exception
*/
When I fold it, it looks like:
/**...*/
Is there any way that I can get it to fold and show the first line of the comment?
such like:
/**compileNews() converts the text of TextCompiler.soundAlarm() to audio as speech.mp3*/
The text shown as a placeholder for a folded code fragment is controlled by the IDE; it cannot be changed by the user. See https://youtrack.jetbrains.com/issue/IDEA-144788 for a related YouTrack issue.
/**
* Comment.
*
* <p>Hello
*
* #author me (me#domain.com)
* #version $Id$
* #since 0.1
* #checkstyle ClassDataAbstractionCoupling (500 lines)
* #checkstyle ClassFanOutComplexity (500 lines)
*/
When I reformat my code with Ctrl+Alt+L, the #since is placed after the #checkstyle tags. Is there any way to disable javadoc tag rearrangement on code reformatting?
You can uncheck Enable JavaDoc formatting in Settings/Code Style/Java/JavaDoc, which should fix the problem.
However this means that no other formatting will be performed (wrapping, alignining, etc). I haven't found a way to disable just the rearranging of tags.
You can also use this plugin with disabled JavaDoc formatting in IDEA.
With that combination you still have an asterisk * inserted at newline, and you can configure all generated JavaDoc templates for each part of code.
It also has a feature of upgrade existing JavaDoc.
When I create a Java file a Javadoc command author is added to file by me. Intellij IDEA also adds date and time which are not yet implemented to Javadoc yet as a comment. When I do auto code indentation it becomes like that:
/**
* #author kamaci
* Date: 11.01.2013
* Time: 00:47
*/
instead of:
/**
* #author kamaci
* Date: 11.01.2013
* Time: 00:47
*/
How to achieve it?
You probably want to uncheck "align parameter descriptions" in Settings->Code Style->Java->JavaDoc(tab)
You can uncheck "Enable leading asterisks".
Reference: https://www.jetbrains.com/help/idea/2016.1/code-style-java.html?origin=old_help