public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("calc_by"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomTextField("calc_display_input").SetText("5+5*5-10/2"); browserWindow.DomLink("btn_enter").Click(); Assert.AreEqual("25", browserWindow.DomTextField("calc_display_input").Text); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("DemoApp"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomTextField("EmailID").SetText("*****@*****.**"); browserWindow.DomTextField("Password").TypePasswordKeys("7092Gw=="); browserWindow.DomButton("login-form login").Click(); Assert.AreEqual("John Smith", browserWindow.DomElement("John Smith").Text); browserWindow.DomButton("logout-form logout").Click(); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("calc_by"); Application xlApp = new Application(); Workbook xlWorkBook = xlApp.Workbooks.Open("C:/Users/German/source/repos/Silk4NETProject3/test.xls", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);; Worksheet xlWorkSheet = (Worksheet)xlWorkBook.Worksheets.get_Item(1);; Microsoft.Office.Interop.Excel.Range range = xlWorkSheet.UsedRange; int rw = 2; for (int rCnt = 1; rCnt <= rw; rCnt++) { string val1 = (range.Cells[rCnt, 1] as Microsoft.Office.Interop.Excel.Range).Value2.ToString(); string operation = (range.Cells[rCnt, 2] as Microsoft.Office.Interop.Excel.Range).Value2.ToString(); string val2 = (range.Cells[rCnt, 3] as Microsoft.Office.Interop.Excel.Range).Value2.ToString(); string res = (range.Cells[rCnt, 4] as Microsoft.Office.Interop.Excel.Range).Value2.ToString(); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomLink("btn_" + val1).Click(); browserWindow.DomLink(operation).Click(); browserWindow.DomLink("btn_" + val2).Click(); browserWindow.DomLink("btn_enter").Click(); Assert.AreEqual(res, browserWindow.DomTextField("calc_display_input").Text); } xlWorkBook.Close(true, null, null); xlApp.Quit(); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("google_com"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomTextField("q").SetText("cos(3x)"); browserWindow.DomElement("http www w3 org 202").Click(); Assert.AreEqual("График функции cos(3*x)", browserWindow.DomElement("graph_heading").Text); }
public void Login_Invalido() { BrowserApplication webBrowser = _desktop.BrowserApplication("voeazul_com_br"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomTextField("login-username").SetText("298429128009"); browserWindow.DomTextField("password").SetText("123456"); browserWindow.DomButton("OK2").Click(); Assert.AreEqual("dialog-0003__message dialog-0003__message--small", browserWindow.DomElement("Se o seu login usual").GetProperty("class")); Silk4NET.VerifyAsset("Imagem Exclamação"); Assert.AreEqual(true, browserWindow.DomElement("Atenção!").Visible); Assert.AreEqual("Atenção!", browserWindow.DomElement("Atenção!").Text); Assert.AreEqual("dialog-0003__title", browserWindow.DomElement("Atenção!").GetProperty("class")); Silk4NET.VerifyAsset("Botão OK Vermelho"); Assert.AreEqual(true, browserWindow.DomButton("OK").Visible); Assert.AreEqual("OK", browserWindow.DomButton("OK").Text); Assert.AreEqual("button-0001 skin-0085", browserWindow.DomButton("OK").GetProperty("class")); browserWindow.DomButton("OK").Click(); Assert.AreEqual("username", browserWindow.DomTextField("login-username").GetProperty("name")); Assert.AreEqual(true, browserWindow.DomTextField("login-username").Visible); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("voeazul_com_br"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomTextField("login-username").SetText("29942912574"); browserWindow.DomTextField("password").SetText("123456"); browserWindow.DomButton("OK2").Click(); Silk4NET.VerifyAsset("Exclamação Vermelho"); Assert.AreEqual(true, browserWindow.DomElement("icon icon-alert").Visible); Assert.AreEqual("", browserWindow.DomElement("icon icon-alert").Text); Assert.AreEqual("icon icon-alert", browserWindow.DomElement("icon icon-alert").GetProperty("class")); Assert.AreEqual(true, browserWindow.DomElement("Atenção!").Visible); Assert.AreEqual("Atenção!", browserWindow.DomElement("Atenção!").Text); Assert.AreEqual("dialog-0003__title", browserWindow.DomElement("Atenção!").GetProperty("class")); Assert.AreEqual(true, browserWindow.DomElement("Se o seu login usual").Visible); Assert.AreEqual("Se o seu login usual não funcionar, por favor tente usar o seu CPF (somente números, sem hífen ou pontos) ou verifique a digitação da sua senha.Persistindo o problema entre em contato com o TudoAzul: 11 – 4003 1141 ou pelo email: [email protected]", browserWindow.DomElement("Se o seu login usual").Text); Assert.AreEqual("dialog-0003__message dialog-0003__message--small", browserWindow.DomElement("Se o seu login usual").GetProperty("class")); /*Silk4NET.VerifyAsset("Botão OK Vermelho");*/ browserWindow.DomButton("OK").Click(); Assert.AreEqual("login-username", browserWindow.DomTextField("login-username").GetProperty("id")); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("calc_by"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomRadioButton("trad").Select(); browserWindow.DomLink("sin").Click(); browserWindow.DomLink("π").Click(); browserWindow.DomLink("btn_mult").Click(); browserWindow.DomLink("btn_6").Click(); browserWindow.DomLink(")").Click(); browserWindow.DomLink("btn_enter").Click(); Assert.AreEqual("0.5", browserWindow.DomTextField("calc_display_input").Text); }
public void TestMethod1() { BrowserApplication webBrowser = _desktop.BrowserApplication("calc_by"); BrowserWindow browserWindow = webBrowser.BrowserWindow("BrowserWindow"); browserWindow.DomLink("n!").Click(); browserWindow.DomLink("btn_5").Click(); browserWindow.DomLink(")").Click(); browserWindow.DomLink("+").Click(); browserWindow.DomLink("btn_3").Click(); browserWindow.DomLink("btn_plus").Click(); browserWindow.DomLink("btn_3").Click(); browserWindow.DomLink("btn_minus").Click(); browserWindow.DomLink("btn_5").Click(); browserWindow.DomLink("btn_enter").Click(); Assert.AreEqual("124", browserWindow.DomTextField("calc_display_input").Text); }