Custom OOTB Command
Replayer Command Customization
-
Log in to the IDA web console. Click the Administrator tab, then switch to the Custom Command tab.
-
Click Custom OOTB Command.
-
Choose the command from the OOTB command list; it will show the template code for usage.
-
Write your command logic after the TODO add your implementation below, For example line.
var coachView = bta.util.getCoachView(this.jsonObject);
var element = coachView.context.element
.querySelector("div.CoachView.MySelect div.dijitInputField input,div.CoachView.MyText div.dijitInputField input");
if (element)
{
var xpath = bta.util.getXpath(element);
var parameter = {
xpath: xpath,
value: value
};
return bta.util.callback("sendKey", parameter);
}
-
Click the save button to save the content.
-
You can run your test case in replay mode to see if it works or not.
Reference
Test Command
JavaScript API
Notes
You can write console.log to debug your replay script in your browser.