Keyword operation script extension not adding info to keyword test editor
I am writing a script extension for my team's use. When I use the jkeyword test operation defined by the script extension, I see my user form as expected. But when I click OK, nothing is added to my keyword editor workspace page. I am following this tutorial page
I think I am seeing that this segment
<Columns> <Column Name="Item" Value="VSI Standard Startup" /> <Column Name="Value" GetValue="StartingSegment_GetValue" /> <Column Name="Description" GetValue="StartingSegment_GetDescription" /> </Columns>
of the description XML is supposed to identify what goes in the columns. And this code
function StartingSegment_GetDescription(Data) { return Data.Description; } function StartingSegment_GetValue(Data) { return Data.QACompleteInfo; }
Where Data is comnig from the values of my user form
function StartingSegment_OnSetup(Data) { var frm = UserForms.ssEditForm; // Display the Operation Properties dialog and check the results if (frm.ShowModal() != mrOk) return false; // No changes were made Data.QACompleteInfo = frm.txtNameId.Text; Data.PreReqText = frm.txtPreReq.Text; }
Can anyone advise as to what I am doing wrong? THANKS!
What do you have set up in your OnClick handler for your OK button? That is where the mrOK value should be set for the show modal. So, once the OK button is clicked, the form "ModalResults" property should be set to mrOK. If that's not happening, then the form closes but it might not have the proper value and the "return false" executes and none of the rest of the data shows.
That's a rough guess but that's where I 'd start.