public void SetText_OnHtmlEditWithOverlappedDiv_Succeeds() { //Arrange using (var tempFile = new TempFile( @"<html> <head> <title>test</title> </head> <body> <div class=""textbox"" id=""idDiv_PWD_UsernameTb"" style=""margin-bottom: 8px;""> <div style=""width: 100%; position: relative;""> <input name=""login"" id=""i0116"" style=""ime-mode: inactive;"" type=""email"" maxLength=""113""/> <div class=""phholder"" style=""left: 0px; top: 0px; width: 100%; position: absolute; z-index: 5;""> <div class=""placeholder"" id=""idDiv_PWD_UsernameExample"" style=""cursor: text;""> Text - [email protected] </div> </div> </div> </body> </html>")) { WebPage.Launch(tempFile.FilePath); var bWin = new WebPage("test"); EnhancedHtmlEdit txtUserName = bWin.Get <EnhancedHtmlEdit>("id=i0116"); //Act txtUserName.SetText("hello"); //Assert Assert.AreEqual("hello", txtUserName.GetText()); bWin.Close(); } }
public void SetText_OnHtmlEdit_Succeeds() { //Arrange using (var tempFile = new TempFile( @"<html> <head> <title>test</title> </head> <body> <div id=""div1""> <input type=""text""/> </div> </body> </html>")) { WebPage.Launch(tempFile.FilePath); var window = new WebPage("test"); EnhancedHtmlDiv div = window.Get <EnhancedHtmlDiv>("id=div1"); EnhancedHtmlEdit inputTextBox = div.Get <EnhancedHtmlEdit>(); //Act inputTextBox.SetText("text"); //Assert Assert.AreEqual("text", inputTextBox.GetText()); window.Close(); } }
public void HtmlEdit_Wrap_Succeeds() { GoogleHomePage pgGHomePage = WebPage.Launch <GoogleHomePage>("http://www.google.com"); var tmp = new HtmlEdit(pgGHomePage); tmp.SearchProperties.Add("Id", "lst-ib"); var txtEdit = new EnhancedHtmlEdit(); txtEdit.WrapReady(tmp); txtEdit.SetText("Coded UI Test enhanced Framework"); GoogleSearch pgSearch = WebPage.GetPage <GoogleSearch>(); pgSearch.Close(); }
public void HtmlEdit_Wrap_Succeeds() { GoogleHomePage pgGHomePage = WebPage.Launch<GoogleHomePage>("http://www.google.com"); var tmp = new HtmlEdit(pgGHomePage); tmp.SearchProperties.Add("Id", "lst-ib"); var txtEdit = new EnhancedHtmlEdit(); txtEdit.WrapReady(tmp); txtEdit.SetText("Coded UI Test enhanced Framework"); GoogleSearch pgSearch = WebPage.GetPage<GoogleSearch>(); pgSearch.Close(); }