• Selenium testing Iframe


    [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;
         }
     }
  • 相关阅读:
    shift
    start
    exit
    call
    goto
    Activity生命周期(二)
    color 和 mode
    pause 和 title
    day 4 飞机大战-面向对象
    day 3 创建窗口,移动-函数版
  • 原文地址:https://www.cnblogs.com/cnblogsfans/p/1564212.html
Copyright © 2020-2023  润新知