Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Error when running script that sets cell data for dropdown in swfTable
posted

I am attempting to have QTP click on the dropdown in a row contained in an swfTable and select a dropdown item.  I am using QTP 9.5 and Infragistics TestAdvantage 2008 Vol. 2 CLR 2.

If I use QTP to record the step I get something like this:

SwfWindow("eCareManager™ System").SwfWindow("Care Plan - Infectious Disease Popup").SwfTable("Infectious Disease Grid").ActivateRow "0"
SwfWindow("eCareManager™ System").SwfWindow("Care Plan - Infectious Disease Popup").SwfTable("Infectious Disease Grid").ActivateCell "0","ResponseToTherapyValueID"
SwfWindow("eCareManager™ System").SwfWindow("Care Plan - Infectious Disease Popup").SwfTable("Infectious Disease Grid").SetCellData "0","ResponseToTherapyValueID","7702c5ad613d43c2af6cc248daa4c9cf"

The code above Activates the row, then Activates the desired cell within that row, and then attempts to select the dropdown choice "Improving".  But for some reason it marks "Improving" as "7702c5ad613d43c2af6cc248daa4c9cf" in the script.

When I run the script, whether using the dropdown item ID captured during recording, or changing the value to "Improving" within the script, I get the following error:

Unable to convert from 'System.String' to 'Visicu.Framework.OID' (sorry that I am including application-specific data in my submitted code, btw).

I need this information because I am creating a PopData action that reads a data table to determine if a dropdown item should be selected and if so which item in the dropdown list for each cell in the grid.  But so far I haven't been able to get it to pick selections off of the dropdown menus.  I have not had this problem with the PopData action I've designed that checks/unchecks checkboxes contained within each row.  That action works fine because they are toggled with 'True' and 'False' parameters for the checkboxes.  But TestAdvantage or QTP seems to be grabbing some sort of ID for each choice in the dropdown menus that can't be translated at runtime.

Any help would be greatly appreciated.