Continue within test case
Re: Continue within test case
If you do what I suggested and put your user code modules in their own sub-test cases, you can do this at the sub-test case level and it will work as you are wanting.
Shortcuts usually aren't...
Re: Continue within test case
Hello !
I tried setting a particular action of a Record to "Enable continue on fail". Then I right clicked it and went to the code which looked like this :
EDIT: Just tried it. It works
Example :
I tried setting a particular action of a Record to "Enable continue on fail". Then I right clicked it and went to the code which looked like this :
try { Report.Log(ReportLevel.Info, "Keyboard", "(Optional Action)\r\nKey sequence '{Tab}'.", new RecordItemIndex(4)); Keyboard.Press("{Tab}"); Delay.Milliseconds(0); } catch(Exception ex) { Report.Warn("(Optional Action) " + ex.Message); }I'm pretty sure you could go to your Code Module and do something like
try { //Paste the actions you want optional } catch(Exception ex) { Report.Warn("(Optional Action) " + ex.Message); }Regards
EDIT: Just tried it. It works
Example :
Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.0; try { repo.MyNonAccessibleElement.Self.Click(); //try to click on a non accessible UI element } catch(Exception ex) { Report.Warn("(Optional Action) " + ex.Message); } Report.Log(ReportLevel.Success,"Test"); //This is reported ! Great !
A simple thank you always does wonders !