Selenium testing Iframe
2009-09-10 17:21 敏捷的水 阅读(2277) 评论(0) 编辑 收藏 举报[TestFixture] public class Search : SeleniumBase { [Test] public void Search() { try { string path = "Search"; CaptureScreen(path, "HomePage.jpg"); selenium.Click("link=MAP SEARCH"); selenium.WaitForFrameToLoad(SeleniumConfig.GetHostURL + @"/Search", "100000"); //select iframe selenium.SelectFrame("//iframe[@src='/Search']"); CaptureScreen(path, "Map.jpg"); selenium.Type("id=key", "London"); selenium.Click("id=searchPoint"); Thread.Sleep(5000); //back to main window selenium.SelectWindow("null"); Thread.Sleep(5000); } catch (Exception ex) { verificationErrors.Append(ex.Message); throw ex; } }
扫码关注公众号,了解更多管理,见识,育儿等内容
作者: 王德水
出处:http://www.cnblogs.com/cnblogsfans
版权:本文版权归作者所有,转载需经作者同意。
出处:http://www.cnblogs.com/cnblogsfans
版权:本文版权归作者所有,转载需经作者同意。