Page 1 of 1

Issue while using recorded script code

Posted: Tue Oct 16, 2018 1:01 pm
by mohan.pentyala
Hi ,

I am trying to use the image-based recorded code from the code module. but I am getting below error s.Can you please help me to resolve the error s

Code generated in recording :

Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Move item 'Fusion.txtToolbar' at 6;4.", repo.Fusion.txtToolbarInfo, new RecordItemIndex(0));
repo.Fusion.txtToolbar.MoveTo(new Location(txtToolbar_Screenshot3, "6;4", txtToolbar_Screenshot3_Options));
Delay.Milliseconds(200);

Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Fusion.txtToolbar' at 6;4.", repo.Fusion.txtToolbarInfo, new RecordItemIndex(1));
repo.Fusion.txtToolbar.Click(new Location(txtToolbar_Screenshot2, "6;4", txtToolbar_Screenshot2_Options));
Delay.Milliseconds(200);

Error :

The name 'txtToolbar_Screenshot3_Options' does not exist in the current context (CS0103) - D:\Fusion\Fusion\Codemodule\UserCodeModule1.cs:143,87

The name 'txtToolbar_Screenshot3' does not exist in the current context (CS0103) - D:\Fusion\Fusion\Codemodule\UserCodeModule1.cs:143,87

Re: Issue while using recorded script code

Posted: Tue Oct 16, 2018 1:09 pm
by odklizec
Hi,

There is most probably missing txtToolbar_Screenshot3_Options and txtToolbar_Screenshot2_Options in your user code. Check this post:
image-validation-user-code-issue-t10263.html#p41188