Custom OOTB Command


Replayer Command Customization

  1. Log in to the IDA web console. Click the Administrator tab, then switch to the Custom Command tab.

  2. Click Custom OOTB Command.

  3. Choose the command from the OOTB command list; it will show the template code for usage.

  4. 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);
}
  1. Click the save button to save the content.

  2. 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.

Categories:

Updated: