Need help with accessing TestData inside xml !!

Jul 30, 2015 at 12:25 PM
I recently upgraded to VS 2013 and rebuild the entire CUITe solution from scratch due to compatability issues.

All works fine except the data pool connection, nothing has changed but for some reaosn I keep getting the following error when trying the following code -

Hashtable htdata = CUITe.CUITe_DataManager.GetDataRow(typeof(DTAF_VS2013.Tests.Misc.RG08_ReturnToOTIS_link), "DTAF_VS2013.TestData.Test.xml", "sample");

ERROR ENCOUNTERED - An exception of type 'CUITe.Exceptions.ResourceNotFoundException' occurred in CUITe.dll but was not handled in user code

Additional information: Failed to get resource 'DTAF_VS2013.TestData.Test.xml' from type 'DTAF_VS2013.Tests.Misc.RG08_ReturnToOTIS_link' and assembly 'DTAF_VS2013, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.


I am positive that the datapool(xml) path is correct and the xml itself has build action marked as "Embedded".

The solution can be found at --> https://www.dropbox.com/s/a0gf7ieycjirvml/DTAF_VS2013.rar?dl=0

The .cs file which has the above code is "RG08_ReturnToOTIS_link.cs" and is included in the above mentioned solution.

PLEASE HELP I AM SPLITTING MY HAIR HERE !!
Aug 5, 2015 at 6:58 AM
Resolved the issue by using the following commands

Hashtable htData = CUITe.CUITe_DataManager.GetDataRow(Type.GetType("DTAF_VS2013.Tests.Misc.RG08_ReturnToOTIS_link.cs"), "DTAF_VS2013.Tests.TestData.Test.xml", "RG08_ReturnToOTIS_link");

OR

Hashtable htdata = CUITe.CUITe_DataManager.GetDataRow(Type.GetType("DTAF_VS2013.Tests.Misc"), "DTAF_VS2013.Tests.TestData.XMLFile1.xml", "RG08_ReturnToOTIS_link");
Marked as answer by saxenaankit123 on 8/4/2015 at 10:58 PM