public void WebElement_Not_Null_Select_0_items_SelectByIndex_0() { IWebElement element = new FakeWebElement("select", "text"); setSelectionByIndex(element, null, 0); Assert.Fail("not implemented"); }
public void WebElement_and_data_the_First() { const string expectedResult = Recorder.CodeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); var list = new List <object>(); list.Add(webElement); var list1 = new List <object>(); var dict1 = new Dictionary <string, object>(); dict1.Add("key1", "data1"); list1.Add(dict1); var dict2 = new Dictionary <string, object>(); dict2.Add("key2", "data2"); list.Add(dict2); var dataItem = new ReadOnlyCollection <object>(list1); list.Add(dataItem); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 2]).UserData["code"]); }
public void isNotFakeWebElement_ElementData() { bool result = false; bool expectedResult = false; IWebElement element = new FakeWebElement(Recorder.ConstAuxElementData, ""); result = Recorder.IsNotFakeWebElement( element); Assert.AreEqual(expectedResult, result); }
public void isNotFakeWebElement_WebElement() { bool result = false; bool expectedResult = true; IWebElement element = new FakeWebElement("a", "text"); result = Recorder.IsNotFakeWebElement( element); Assert.AreEqual(expectedResult, result); }
public void WebElement_Not_Null_Select_1_itemSelectByIndex_1() { IWebElement element = new FakeWebElement("select", "text"); System.Collections.Generic.List <string> selectItems = new System.Collections.Generic.List <string>(); selectItems.Add("item1"); setSelectionByIndex(element, selectItems, 1); Assert.Fail("not implemented"); }
public void isNotFakeWebElement_ElementSelected() { bool result = false; bool expectedResult = false; IWebElement element = new FakeWebElement(Recorder.ConstAuxElementSelected, ""); result = Recorder.IsNotFakeWebElement( element); Assert.AreEqual(expectedResult, result); }
public void One_WebElement() { const string expectedResult = "a"; IWebElement webElement = new FakeWebElement(expectedResult, "text"); var list = new List<object>(); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 1]).UserData["TagName"]); }
public void RecordActionItem_Click() { IRecordedCodeSequence result = null; string expectedResult = Recorder.CodeGenElementClick; IRecordedCodeSequence codeSequence = null; IWebElement element = new FakeWebElement(Recorder.ConstAuxElementClicked, ""); result = generateActionItem( codeSequence, element, (new RecordedAction())); Assert.AreEqual( expectedResult, ((IRecordedActionItem)result.Items[result.Items.Count - 1]).UserData["code"]); }
public void RecordWebItem_Displayed() { IRecordedCodeSequence result = null; bool expectedResult = true; IRecordedCodeSequence codeSequence = null; IWebElement element = new FakeWebElement("a", "text abc", true, false, false); result = generateWebItem( codeSequence, element, (new RecordedWebElement())); Assert.AreEqual( expectedResult, ((IRecordedElementItem)result.Items[result.Items.Count - 1]).UserData["Displayed"]); }
public void RecordWebItem_Text() { IRecordedCodeSequence result = null; string expectedResult = "OK"; IRecordedCodeSequence codeSequence = null; IWebElement element = new FakeWebElement("button", expectedResult); result = generateWebItem( codeSequence, element, (new RecordedWebElement())); Assert.AreEqual( expectedResult, ((IRecordedElementItem)result.Items[result.Items.Count - 1]).UserData["Text"]); }
public void RecordWebItem_Size() { IRecordedCodeSequence result = null; Size expectedResult = new Size(1, 1); IRecordedCodeSequence codeSequence = null; IWebElement element = new FakeWebElement("a", "text abc", new Point(2, 2), expectedResult); result = generateWebItem( codeSequence, element, (new RecordedWebElement())); Assert.AreEqual( expectedResult, ((IRecordedElementItem)result.Items[result.Items.Count - 1]).UserData["Size"]); }
public void One_WebElement() { const string expectedResult = "a"; IWebElement webElement = new FakeWebElement(expectedResult, "text"); var list = new List <object>(); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 1]).UserData["TagName"]); }
public void WebElement_and_action_and_data_the_Last() { const string expectedResult = "textData"; IWebElement webElement = new FakeWebElement("button", "OK"); var list = new List <object>(); list.Add(webElement); webElement = new FakeWebElement(Recorder.ConstAuxElementClicked, ""); list.Add(webElement); // System.Collections.Generic.List<object> list1 = // new System.Collections.Generic.List<object>(); // Dictionary<string, object> dict1 = // new Dictionary<string, object>(); // dict1.Add("code", expectedResult); // list1.Add(dict1); // ReadOnlyCollection<object> dataItem = // new ReadOnlyCollection<object>(list1); var list1 = new List <object>(); var dict1 = new Dictionary <string, object>(); //dict1.Add("code", expectedResult); dict1.Add("key", "code"); list1.Add(dict1); var dict2 = new Dictionary <string, object>(); dict2.Add("value", expectedResult); list1.Add(dict2); var dataItem = new ReadOnlyCollection <object>(list1); list.Add(dataItem); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedData)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 1]).UserData["code"]); }
public void WebElement_and_action_the_Last() { const string expectedResult = Recorder.CodeGenElementClick; IWebElement webElement = new FakeWebElement("button", "OK"); var list = new List <object>(); list.Add(webElement); webElement = new FakeWebElement(Recorder.ConstAuxElementClicked, ""); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedAction)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 1]).UserData["code"]); }
public void WebElement_and_action_the_First() { const string expectedResult = Recorder.CodeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); var list = new List <object>(); list.Add(webElement); webElement = new FakeWebElement("recclicked", ""); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 2]).UserData["code"]); }
public void Two_WebElements_the_First() { string expectedResult = "a"; IWebElement webElement = new FakeWebElement(expectedResult, "text"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); webElement = new FakeWebElement("button", "OK"); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.recordingCollection[Recorder.recordingCollection.Count - 2].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 2].Items.Count - 1]).UserData["TagName"]); }
public void WebElement_and_action_and_data_the_First() { const string expectedResult = Recorder.CodeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); var list = new List <object>(); list.Add(webElement); webElement = new FakeWebElement("recclicked", ""); list.Add(webElement); var list1 = new List <object>(); var dict1 = new Dictionary <string, object>(); //dict1.Add("code", expectedResult); dict1.Add("key", "code"); list1.Add(dict1); var dict2 = new Dictionary <string, object>(); dict2.Add("value", expectedResult); list1.Add(dict2); var dataItem = new ReadOnlyCollection <object>(list1); list.Add(dataItem); runRecordActions(list); // foreach (var aaaa in ((RecordedData)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ // Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 1]).UserData.Keys) { // Console.WriteLine(aaaa); // } Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items[ Recorder.RecordingCollection[Recorder.RecordingCollection.Count - 1].Items.Count - 3]).UserData["code"]); }
public void CodeSequence_with_of_the_same_type_RecordedAction() { IRecordedCodeSequence result = null; string expectedResult = Recorder.CodeGenElementClick; IRecordedCodeSequence codeSequence = new RecordedCodeSequence(); IWebElement alreadyHere = new FakeWebElement(Recorder.ConstAuxElementClicked, "aaa"); IWebElement element = new FakeWebElement(Recorder.ConstAuxElementClicked, ""); result = generateActionItem( codeSequence, element, (new RecordedAction())); Assert.AreEqual( expectedResult, ((IRecordedActionItem)result.Items[result.Items.Count - 1]).UserData["code"]); }
public void WebElement_and_data_the_Last() { string expectedResult = "textData"; IWebElement webElement = new FakeWebElement("button", "OK"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); // System.Collections.Generic.List<object> list1 = // new System.Collections.Generic.List<object>(); // Dictionary<string, object> dict1 = // new Dictionary<string, object>(); // dict1.Add("code", expectedResult); // list1.Add(dict1); // ReadOnlyCollection<object> dataItem = // new ReadOnlyCollection<object>(list1); System.Collections.Generic.List<object> list1 = new System.Collections.Generic.List<object>(); Dictionary<string, object> dict1 = new Dictionary<string, object>(); //dict1.Add("code", expectedResult); dict1.Add("key", "code"); list1.Add(dict1); Dictionary<string, object> dict2 = new Dictionary<string, object>(); dict2.Add("value", expectedResult); list1.Add(dict2); ReadOnlyCollection<object> dataItem = new ReadOnlyCollection<object>(list1); list.Add(dataItem); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedData)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 1]).UserData["code"]); }
public void WebElement_and_data_the_First() { string expectedResult = Recorder.codeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); System.Collections.Generic.List<object> list1 = new System.Collections.Generic.List<object>(); Dictionary<string, object> dict1 = new Dictionary<string, object>(); dict1.Add("key1", "data1"); list1.Add(dict1); Dictionary<string, object> dict2 = new Dictionary<string, object>(); dict2.Add("key2", "data2"); list.Add(dict2); ReadOnlyCollection<object> dataItem = new ReadOnlyCollection<object>(list1); list.Add(dataItem); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 2]).UserData["code"]); }
public void WebElement_and_action_the_Last() { string expectedResult = Recorder.codeGenElementClick; IWebElement webElement = new FakeWebElement("button", "OK"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); webElement = new FakeWebElement(Recorder.constAuxElementClicked, ""); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedAction)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 1]).UserData["code"]); }
public void WebElement_and_action_the_First() { string expectedResult = Recorder.codeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); webElement = new FakeWebElement("recclicked", ""); list.Add(webElement); runRecordActions(list); Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 2]).UserData["code"]); }
public void WebElement_and_action_and_data_the_First() { string expectedResult = Recorder.codeGenGetElement; IWebElement webElement = new FakeWebElement("a", "text"); System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>(); list.Add(webElement); webElement = new FakeWebElement("recclicked", ""); list.Add(webElement); System.Collections.Generic.List<object> list1 = new System.Collections.Generic.List<object>(); Dictionary<string, object> dict1 = new Dictionary<string, object>(); //dict1.Add("code", expectedResult); dict1.Add("key", "code"); list1.Add(dict1); Dictionary<string, object> dict2 = new Dictionary<string, object>(); dict2.Add("value", expectedResult); list1.Add(dict2); ReadOnlyCollection<object> dataItem = new ReadOnlyCollection<object>(list1); list.Add(dataItem); //Console.WriteLine("00005"); runRecordActions(list); //Console.WriteLine("00006"); // foreach (var aaaa in ((RecordedData)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ // Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 1]).UserData.Keys) { // Console.WriteLine(aaaa); // } Assert.AreEqual( expectedResult, ((RecordedWebElement)Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items[ Recorder.recordingCollection[Recorder.recordingCollection.Count - 1].Items.Count - 3]).UserData["code"]); }
public void WebElement_Not_Null_Select_1_itemSelectByIndex_1() { IWebElement element = new FakeWebElement("select", "text"); System.Collections.Generic.List<string> selectItems = new System.Collections.Generic.List<string>(); selectItems.Add("item1"); setSelectionByIndex(element, selectItems, 1); Assert.Fail("not implemented"); }
public void RecordActionItem_Click() { IRecordedCodeSequence result = null; string expectedResult = Recorder.codeGenElementClick; IRecordedCodeSequence codeSequence = null; IWebElement element = new FakeWebElement(Recorder.constAuxElementClicked, ""); result = generateActionItem( codeSequence, element, (new RecordedAction())); Assert.AreEqual( expectedResult, ((IRecordedActionItem)result.Items[result.Items.Count - 1]).UserData["code"]); }