Executing Steps

  1. Start timer for calculating the time needed to execute this step
  2. Some errors retry the step up to 3 times – so if it is first time reset to indicate this as first attempt – in any case increment attempt count
  3. Check if the test suite or test case has received a signal to stop execution, if yes, abort the execution
  4. If apicapture flag is on – update the test step info to indicate the step for which apis are being captured
  5. If in debug mode – handle debugging options
  6. If conditional logic defined for step –
    • Evaluate the expression – look at section “Evaluating Conditional Logic”
    • If-true and expression evaluates to true then execute step else skip step
    • If-false and expression evaluates to false then execute step else skip step
  7. If step has been disabled then skip step
  8. If merge copilot is on and reached the step where user wants to add new steps – then wait for the seleniumwaittime – (typically 300s) and then exit. In the background the user can add the new steps.
  9. Process testdata – Look at the Processing Testdata Section for details
    • If the step has a variable defined – assign the generated or evaluated data testdata to the variable
  10. If any of the element locator have variables defined in them – the variable is replaced with the runtime value
  11. For a multi run case – multi data sets – checks if we have reached end of file – as in all data sets have been processed, if yes, exits
  12. Mask any sensitive data – write masked data to log file for non sensitive data
  13. If wait time is setup – wait for the prescribed time
  14. If the windowid of current step is different to the windoid of the previous step
  15. If (Keyword → Window action → Create) – current step needs to execute on a different window than the previous step – launch a browser window and go to next step
  16. Else Switch to new window
    • Check if the windowid is mapped to runtime windowid in cache
    • If not – get a list of all opened windows and compare their ids with windowid
    • Switch control to the appropriate window handle
    • Cache the new windowid for the duration of the execution
  17. If the tabid of the previous step and the current step do not match
    • If (Keyword → Tab) – current step needs to execute on a different tab than the previous step – launch a browser window and go to next step
    • Else switch to new tab
    • Cache the tab id
  18. Iframes – if previous and current step iframe paths do not match
    • If the frame id of the previous step and the current step do not match – switch to iframe of current step (iframe to default or default to iframe)
    • If iframe path is empty – switch to default frame
    • If need to jump from 1 iframe to another iframe – first switch to default frame and then switch to the second iframe (iframe → default → new frame)

Have other questions? Access our full knowledge base!

Verified by MonsterInsights