質問

I am using Testcomplete software and C# scripting.

I am able to read the data from the excel but I am not able to put them in a dictionary.So seeking help.

役に立ちましたか?

解決

C#Script is based on the Microsoft JScript language (the same as JavaScript). Objects in this language behave in the same way as Dictionary objects and so you can use this functionality without any problems:

  var dict = new Object();
  dict["MyKey1"] = ["Obj1Val1", "Obj1Val2"];
  dict["MyKey2"] = ["Obj2Val1", "Obj2Val2"];
  dict["MyKey3"] = ["Obj3Val1", "Obj3Val2"];
  Log.Message(dict["MyKey2"][1]);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top