code not stepping into the "case" statement
Hello,
I'm using similar code in my project without any issues but the following code is not working as expected:
function GetCBOProfileSabreProfileID(varsp1);
var
page, obj;
begin
page := Sys.Browser('*').Page(EnvironmentSettings2.GetServerURL + '*');
obj := GetNativeWebObject(page, 'id', 'fieldAdditionalInfoSabreProfileID');
obj.ScrollIntoView(false);
Delay(1000);
obj.innertext;
obj := obj.innertext;
CBOSabreProfileIDInput := obj;
//Assign var1 for the persistent variable
case varsp1 of
'CBOSabreID0':
begin
ProjectSuite.Variables.CBOSabreID0 := CBOSabreProfileIDInput;
log.message(ProjectSuite.Variables.CBOSabreID0);
end;
end;
end;
When i set a breakpoint at the line "case varsp1 of" and step through it, it goes to the next line and then skips to the end.
If I execute the following modified code (used to debug) it works fine.
function GetCBOProfileSabreProfileID(varsp1);
var
page, obj;
begin
page := Sys.Browser('*').Page(EnvironmentSettings2.GetServerURL + '*');
obj := GetNativeWebObject(page, 'id', 'fieldAdditionalInfoSabreProfileID');
obj.ScrollIntoView(false);
Delay(1000);
obj.innertext;
obj := obj.innertext;
CBOSabreProfileIDInput := obj;
ProjectSuite.Variables.CBOSabreID0 := CBOSabreProfileIDInput;
log.message(ProjectSuite.Variables.CBOSabreID0);
//Assign var1 for the persistent variable
case varsp1 of
'CBOSabreID0':
begin
ProjectSuite.Variables.CBOSabreID0 := CBOSabreProfileIDInput;
log.message(ProjectSuite.Variables.CBOSabreID0);
end;
end;
end;
Please advise me on what I'm doing incorrectly.
Thanks,
Kim