## Methods that TBot can call in getTestInput(). For query and control the app under test and system under test from inside the TBot execution. ==path=API.testExec== ## Description group API for test action execution. ## Group Methods 1. **checkIfOutOfAppOK**, path=API.testExec.checkIfOutOfAppOK * Description: tells if TestDragon is checking whether the app under test runs in the foreground. * Return Value: True if TestDragon does not check whether the app under test is still in the foreground. False otherwise. 2. **adviseOutOfAppOK**, path=API.testExec.adviseOutOfAppOK * Description: suggests TestDragon do not check whether the app under test runs in the foreground from now on. 3. **resumeOutOfAppCheck**, path=API.testExec.resumeOutOfAppCheck * Description: suggests TestDragon checking whether the app under test runs in the foreground from now on. 4. **replayTrace**, path=API.testExec.replayTrace * Description: execute a registered trace. Note that this method does not execute the trace. It only return a list that can be used as the * Return Value of a test robot's getTestInput() method. * Arguments: 1. *t* : a registered trace that you can set from via GUI menubar or API * Return Value: the return report of TBot Replay executing trace t. 5. **getRandomActionIndex**, path=API.testExec.getRandomActionIndex * Description: get a random actionable element index. You can directly use this a * Return Value of getTestInput() in case it is the index of an action without * Arguments. * Arguments: 1. *ProportionScreenAction* : a fractional in [0,1] for probability of screen actionables in all actions. * Return Value: a random action index in the legal action list. 6. **getRandomAction**, path=API.testExec.getRandomAction * Description: get a random actionable element. * Arguments: 1. *ProportionScreenAction* : probability of screen actionables in all actions. * Return Value: a dict of a random action. 7. **getBestCoverageAction**, path=API.testExec.getBestCoverageAction * Description: getBestCoverageAction * Return Value: action that may result in the best action coverage. The * Return Value can directly be used as * Return Value of getTestInput() in a TBot. If somehow the coverage information is missing, then None is returned. 8. **getFormFill**, path=API.testExec.getFormFill * Description: return a form filling suggestions from the submit button action. * Arguments: 1. *action* : the python dict of a submit button action in the dom of the current screen state. If it is an integer, then it is interpreted as the submit button action index of a form. If it is a form topic, then the inTOL mega test robot will use this to search for a submit button of an appropriate form in the dom of the current screen state. * Return Values form a list. 1. The 1st element is an integer for the submitForm action index in legalActionList 2. The 2nd element is a dict for data filling to the form whose submit action is specified by the argument. 9. **getFormFillAsPostRequest**, path=API.testExec.getFormFillAsPostRequest * Description: return a post request command form filling suggestions from the submit button action. * Arguments: 1. *action* : the python dict of a submit button action in the dom of the current screen state. If it is an integer, then it is interpreted as the submit button action index of a form. If it is a form topic, then the inTOL mega test robot will use this to search for a submit button of an appropriate form in the dom of the current screen state. * Return Values form a list. 1. The 1st element is a url for the post request 2. The 2nd element is a dict for the post parameter. 10. **getLoginSuggestions**, path=API.testExec.getLoginSuggestions * Description: check if already logged in and return actions to login if not logged in yet. * Return Values form a list. 1. The 1st element is an integer for a test action to login or a string in ["already logged in!", "login trials failed!"] 2. The 2nd element is a dict for login account id and password if a matching test data card is found!