Hi Team,
I am getting a build error saying "The name 'TestCase' does not exist in the current context" after migrating our scripts from Ranorex 5.3.2 to Ranorex 8.3.1 . Please help.
Code:
public void Validate_DocumentContext()
{
string strDocNo, strSoldToPartner;
TestCase.Current.DataContext.Parameters.TryGetValue("DocNumber", out strDocNo);
TestCase.Current.DataContext.Parameters.TryGetValue("SoldToPartner", out strSoldToPartner);
var strTempStr = strDocNo + ".*" + strSoldToPartner;
var label_DocNum = repo.GenericDocument.Object.CaptionGrid.Label_DocNum;
Validate.Attribute(label_DocNum, "innertext", new Regex(strTempStr));
}
Note: Attaching screen shot of the problematic code and build error.
Regards,
Chiranth
Getting build error: The name 'TestCase' does not exist in the current context after migrating our scripts to Ranorex 8
-
- Posts: 20
- Joined: Mon Oct 29, 2018 1:09 pm
Getting build error: The name 'TestCase' does not exist in the current context after migrating our scripts to Ranorex 8
You do not have the required permissions to view the files attached to this post.
Re: Getting build error: The name 'TestCase' does not exist in the current context after migrating our scripts to Ranor
hey Chiranth,
Seems like your code is already obsolete.
Retrieving a parameter's value of the current test case:
Retrieve a global parameter's value:
Hope, this helps
regards, qwertzu
Seems like your code is already obsolete.
Retrieving a parameter's value of the current test case:
Code: Select all
TestSuite.CurrentTestContainer.Parameters.TryGetValue();
Code: Select all
TestSuite.Current.Parameters.TryGetValue();
regards, qwertzu