當前位置: 首頁>>代碼示例>>C#>>正文


C# InternetExplorerDriver.Manage方法代碼示例

本文整理匯總了C#中OpenQA.Selenium.IE.InternetExplorerDriver.Manage方法的典型用法代碼示例。如果您正苦於以下問題:C# InternetExplorerDriver.Manage方法的具體用法?C# InternetExplorerDriver.Manage怎麽用?C# InternetExplorerDriver.Manage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenQA.Selenium.IE.InternetExplorerDriver的用法示例。


在下文中一共展示了InternetExplorerDriver.Manage方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreateWebDriver

 public IWebDriver CreateWebDriver()
 {
     var driver = new InternetExplorerDriver();
     driver.Manage().Window.Maximize();
     driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(3));
     return driver;
 }
開發者ID:xcyroo,項目名稱:InnovationDay.AcceptanceTesting,代碼行數:7,代碼來源:LocalIeEnvironment.cs

示例2: ConfigureDriver

 public static IWebDriver ConfigureDriver(IWebDriver driver, string driverType, string driverPath)
 {
     switch (driverType)
     {
         case "ie":
             {
                 driver = new InternetExplorerDriver(driverPath);
                 driver.Manage().Window.Maximize();
                 return driver;
             }
         case "firefox":
             {
                 driver = new FirefoxDriver();
                 driver.Manage().Window.Maximize();
                 return driver;
             }
         case "chrome":
             {
                 driver = new ChromeDriver(driverPath);
                 driver.Manage().Window.Maximize();
                 return driver;
             }
     }
     return driver;
 }
開發者ID:marcinkoczan,項目名稱:selenium,代碼行數:25,代碼來源:SelMetody.cs

示例3: Should_page_through_items_in_IE

        public void Should_page_through_items_in_IE()
        {
            IWebDriver ieDriver = new InternetExplorerDriver();
            ieDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
            ieDriver.Navigate().GoToUrl("http://localhost:1392/");
            Login(ieDriver);

            ieDriver.FindElement(By.LinkText("Orders")).Click();

            for (int i = 0; i < 20; i++)
            {
                IWebElement nextButton = ieDriver.FindElement(By.Id("ContentPlaceHolder1_GridView1_ctl00_ImageButtonNext"));

                nextButton.Click();

                IWebElement pageCount = ieDriver.FindElement(By.Id("ContentPlaceHolder1_GridView1_ctl00_TextBoxPage"));

                int pageNumber = int.Parse(pageCount.GetAttribute("value"));

                Assert.AreEqual(i + 2, pageNumber);
            }

            ieDriver.FindElement(By.Id("LoginStatus1")).Click();
            ieDriver.Quit();
        }
開發者ID:NathanGloyn,項目名稱:Selenium-UI-Testing,代碼行數:25,代碼來源:When_using_other_browsers.cs

示例4: IntializeDriver

 internal void IntializeDriver(ref IWebDriver driver, ref bool IsBrowserDimendion, ref List<IWebDriver> driverlist, ref int width, ref int height,ref bool DeleteCookie)
 {
     InternetExplorerOptions options = new InternetExplorerOptions();
     // Commented to check CSA related problem
     options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
     options.EnablePersistentHover = false; //added for IE-8 certificate related issue.
     if (DeleteCookie)
     {
         options.EnsureCleanSession = true;
     }
     driver = new InternetExplorerDriver(Property.ApplicationPath + @"\Exes", options);
     driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(150));
     driver.Manage().Window.Maximize();    //  Added to maximize IE window forcibely, as this code is updated Action file.
     if (IsBrowserDimendion)
         driver.Manage().Window.Size = new System.Drawing.Size(width, height);
     driverlist.Add(driver);
 }
開發者ID:Thinksys,項目名稱:krypton,代碼行數:17,代碼來源:IE.cs

示例5: getIEDriver

 public static IWebDriver getIEDriver()
 {
     DriverFactory.DeleteIECookiesAndData();
     InternetExplorerOptions options = new InternetExplorerOptions();
     options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
     IWebDriver driver = new InternetExplorerDriver(options);
     driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(waitsec));
     return driver;
 }
開發者ID:pjagga,項目名稱:SeleniumMSTestVS2013,代碼行數:9,代碼來源:DriverFactory.cs

示例6: Create

 public IWebDriver Create()
 {
     if (browserType == Type)
     {
         var profileIE = new InternetExplorerOptions();
         profileIE.EnableNativeEvents = true;
         var browser = new InternetExplorerDriver(profileIE);
         browser.Manage().Cookies.DeleteAllCookies();
         return browser;
     }
     return null;
 }
開發者ID:agentmilindu,項目名稱:CodeSpec,代碼行數:12,代碼來源:IEBrowser.cs

示例7: CreateWebDriver

        private static IWebDriver CreateWebDriver()
        {
            var options = new InternetExplorerOptions
            {
                // This setting is used to ignore the requirement that protected mode must
                // be set the same for all modes
                // See: https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration
                IntroduceInstabilityByIgnoringProtectedModeSettings = true
            };
            var driverPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var driver = new InternetExplorerDriver(driverPath, options);

            // Configure the driver to wait up to 3 seconds for elements to appear
            driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 0, 3));

            return driver;
        }
開發者ID:stardawg,項目名稱:CIDemo,代碼行數:17,代碼來源:Driver.cs

示例8: SelectBrowser

 /// <summary>
 /// BROWSER_TYPEの値によって起動するブラウザを変える
 /// (firefox以外は不安定)
 /// </summary>
 /// <param name="webDriver"></param>
 public static void SelectBrowser(ref IWebDriver webDriver)
 {
     switch (AppConfig.GetString(Config.BROWSER_TYPE))
     {
         case "1": // FireFox
             FirefoxBinary firefoxBinary = new FirefoxBinary(@"C:\Program Files (x86)\Mozilla Firefox\firefox.exe");
             FirefoxProfile firefoxProfile = new FirefoxProfile();
             webDriver = new FirefoxDriver(firefoxBinary, firefoxProfile);
             break;
         case "2": // Chrome
             webDriver = new ChromeDriver();
             break;
         case "3": // IE
             // ブラウザのズームレベルを100%にしないと落ちる
             webDriver = new InternetExplorerDriver();
             break;
         default:
             throw new OriginalException("BROWSER_TYPEが不正です。1~3の間で設定してください。");
     }
     webDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
     webDriver.Url = AppConfig.GetString(Config.TEST_URL);
 }
開發者ID:isaito-kurumizawa,項目名稱:Selenium-WEB-Driver,代碼行數:27,代碼來源:CommonTest.cs

示例9: IEDriverSetUp

		public static InternetExplorerDriver IEDriverSetUp()
        {
            
            Action ensureDriverExists =
                () =>
                {
                    const string ieDriverExe = "IEDriverServer.exe.exe";
					var fullPath = DriversFolder.pathCombine(ieDriverExe);
                    var is64BitOperatingSystem = Environment.Is64BitOperatingSystem;

                    if (fullPath.fileExists().isFalse())
                    {
						var downloadUrl = is64BitOperatingSystem ? IEDriverDownloadLinkx64 : IEDriverDownloadLinkx32;

                        var downloadedZipFile = downloadUrl.download();
						downloadedZipFile.unzip_File(DriversFolder);
                    }
                };
            Action configureEnvironmentPath =
                () =>
                {
                    var currentEnvironmentPath = Environment.GetEnvironmentVariable("Path");

					if (currentEnvironmentPath.contains(DriversFolder).isFalse())
                    {
						var newEnvironmentPath = "{0};{1}".info(currentEnvironmentPath, DriversFolder);
                        "Setting Environment Path to: {0}".format(newEnvironmentPath);
                        Environment.SetEnvironmentVariable("Path", newEnvironmentPath);
                    }
                    else
						"Environment Path already had: {0}".info(DriversFolder);
                };
			ensureDriverExists();
            configureEnvironmentPath();
		    var IEDriver = new InternetExplorerDriver();
		    IEDriver.Manage().Cookies.DeleteAllCookies();
			return  IEDriver;
        }
開發者ID:CallMeSteve,項目名稱:O2.Platform.Scripts,代碼行數:38,代碼來源:SeleniumWebDrivers_Setup.cs

示例10: InitializeInstalledBrowserDriver

 /// <summary>
 /// Gets the web driver for locally installed browsers.
 /// </summary>
 /// <param name="testSettings">The test settings.</param>
 /// <param name="testOutputHelper">The test output helper.</param>
 /// <returns></returns>
 /// <exception cref="TestConfigurationException">The details you specified are invalid</exception>
 /// <exception cref="TestConfigurationException">The details you specified are invalid</exception>
 public static ITestWebDriver InitializeInstalledBrowserDriver(TestSettings testSettings,
     ITestOutputHelper testOutputHelper)
 {
     ScreenShotCounter = 0;
     TestOutputHelper = testOutputHelper;
     testSettings = ValidateSavePaths(testSettings);
     switch (testSettings.DriverType)
     {
         case WebDriverType.ChromeDriver:
         {
             string driverLocation = Path.Combine(AssemblyDirectory, "chromedriver.exe");
             driverLocation = ValidateDriverPresentOrUnblocked(WebDriverType.ChromeDriver, driverLocation);
             testSettings.BrowserName = "Chrome";
             var driverService = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverLocation),
                 Path.GetFileName(driverLocation));
             var options = new ChromeOptions
             {
                 LeaveBrowserRunning = false
             };
             options.AddArgument("--no-default-browser-check");
             options.AddArgument("--test-type=browser");
             options.AddArgument("--start-maximized");
             options.AddArgument("--allow-no-sandbox-job");
             options.AddArgument("--disable-component-update");
             options.AddArgument("--auth-server-whitelist=" + testSettings.TestUri.Authority.Replace("www", "*"));
             var driver = new ChromeDriver(driverService, options, testSettings.TimeoutTimeSpan);
             var firingDriver = AttachDriverEvents(driver);
             if (testSettings.DeleteAllCookies)
             {
                 firingDriver.Manage().Cookies.DeleteAllCookies();
             }
             driver.Manage().Timeouts().ImplicitlyWait(testSettings.TimeoutTimeSpan);
             if (testSettings.MaximiseBrowser)
             {
                 firingDriver.Manage().Window.Maximize();
             }
             var extendedWebDriver = new TestWebDriver(firingDriver, testSettings, TestOutputHelper);
             TestWebDriver = extendedWebDriver;
             return extendedWebDriver;
         }
         case WebDriverType.FirefoxDriver:
         {
             testSettings.BrowserName = "Firefox";
             string winePath =
                 Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                 "\\MultiBrowser\\Drivers\\FirefoxDrivers\\wires-0.6.2-win\\";
             var driverService = FirefoxDriverService.CreateDefaultService(winePath);
                 //var driverService = FirefoxDriverService.CreateDefaultService();
                 var options = new FirefoxOptions();
             options.IsMarionette = true;
             var driver = new FirefoxDriver(driverService, options, testSettings.TimeoutTimeSpan);
             if (testSettings.DeleteAllCookies)
             {
                 driver.Manage().Cookies.DeleteAllCookies();
             }
             driver.Manage().Timeouts().ImplicitlyWait(testSettings.TimeoutTimeSpan);
             if (testSettings.MaximiseBrowser)
             {
                 driver.Manage().Window.Maximize();
             }
             var extendedWebDriver = new TestWebDriver(driver, testSettings, TestOutputHelper);
             TestWebDriver = extendedWebDriver;
             return extendedWebDriver;
         }
         case WebDriverType.InternetExplorerDriver:
         {
             testSettings.BrowserName = "IE";
             var driverName = "IEDriverServer.exe";
             if (Environment.Is64BitProcess)
             {
                 driverName = "IEDriverServer64.exe";
             }
             string driverLocation = Path.Combine(AssemblyDirectory, driverName);
             driverLocation = ValidateDriverPresentOrUnblocked(WebDriverType.InternetExplorerDriver,
                 driverLocation);
             var driverService =
                 InternetExplorerDriverService.CreateDefaultService(Path.GetDirectoryName(driverLocation),
                     Path.GetFileName(driverLocation));
             var options = new InternetExplorerOptions
             {
                 IgnoreZoomLevel = true,
                 IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                 BrowserAttachTimeout = testSettings.TimeoutTimeSpan,
                 RequireWindowFocus = true,
                 ElementScrollBehavior = InternetExplorerElementScrollBehavior.Bottom,
                 InitialBrowserUrl = testSettings.TestUri.AbsoluteUri,
                 EnsureCleanSession = true,
                 EnableNativeEvents = true
             };
             var driver = new InternetExplorerDriver(driverService, options, testSettings.TimeoutTimeSpan);
             if (testSettings.DeleteAllCookies)
             {
//.........這裏部分代碼省略.........
開發者ID:Jayman1305,項目名稱:Selenium.Extensions,代碼行數:101,代碼來源:WebDriverManager.cs

示例11: InitializeStandaloneBrowserDriver

 /// <summary>
 /// Gets the web driver for standalone browsers.
 /// </summary>
 /// <param name="testSettings">The test settings.</param>
 /// <param name="browserVersion">The browser version.</param>
 /// <param name="testOutputHelper">The test output helper.</param>
 /// <returns></returns>
 public static ITestWebDriver InitializeStandaloneBrowserDriver(TestSettings testSettings, decimal browserVersion,
     ITestOutputHelper testOutputHelper)
 {
     ScreenShotCounter = 0;
     TestOutputHelper = testOutputHelper;
     testSettings = ValidateSavePaths(testSettings);
     switch (testSettings.DriverType)
     {
         case WebDriverType.ChromeDriver:
         {
             string driverLocation;
             switch (browserVersion.ToString(CultureInfo.InvariantCulture))
             {
                 case "48":
                 case "47":
                 case "46":
                 case "45":
                 case "44":
                 case "43":
                     driverLocation =
                         Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                         "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.20\\chromedriver.exe";
                     break;
                 case "42":
                 case "41":
                 case "40":
                 case "39":
                     driverLocation =
                         Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                         "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.14\\chromedriver.exe";
                     break;
                 case "38":
                 case "37":
                 case "36":
                     driverLocation =
                         Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                         "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.11\\chromedriver.exe";
                     break;
                 case "35":
                 case "34":
                 case "33":
                     driverLocation =
                         Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                         "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.10\\chromedriver.exe";
                     break;
                 case "32":
                 case "31":
                 case "30":
                     driverLocation =
                         Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                         "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.8\\chromedriver.exe";
                     break;
                 default:
                     driverLocation = Path.Combine(AssemblyDirectory, "chromedriver.exe");
                     break;
             }
             ValidateDriverPresentOrUnblocked(WebDriverType.ChromeDriver, driverLocation);
             testSettings.BrowserName = "Chrome " + browserVersion;
             var multiBrowserExe =
                 Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
                 "\\MultiBrowser\\MB_Chrome" + browserVersion + ".exe";
             var driverService = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverLocation),
                 Path.GetFileName(driverLocation));
             var options = new ChromeOptions
             {
                 LeaveBrowserRunning = false,
                 BinaryLocation = multiBrowserExe
             };
             options.AddArgument("--no-default-browser-check");
             options.AddArgument("--test-type=browser");
             options.AddArgument("--start-maximized");
             options.AddArgument("--allow-no-sandbox-job");
             options.AddArgument("--disable-component-update");
             options.AddArgument("--auth-server-whitelist=" + testSettings.TestUri.Authority.Replace("www", "*"));
             var driver = new ChromeDriver(driverService, options, testSettings.TimeoutTimeSpan);
             if (testSettings.DeleteAllCookies)
             {
                 driver.Manage().Cookies.DeleteAllCookies();
             }
             driver.Manage().Timeouts().ImplicitlyWait(testSettings.TimeoutTimeSpan);
             if (testSettings.MaximiseBrowser)
             {
                 driver.Manage().Window.Maximize();
             }
             var extendedWebDriver = new TestWebDriver(driver, testSettings, TestOutputHelper);
             TestWebDriver = extendedWebDriver;
             return extendedWebDriver;
         }
         case WebDriverType.FirefoxDriver:
         {
             testSettings.BrowserName = "Firefox " + browserVersion;
             var multiBrowserExe =
                 Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
//.........這裏部分代碼省略.........
開發者ID:Jayman1305,項目名稱:Selenium.Extensions,代碼行數:101,代碼來源:WebDriverManager.cs

示例12: TestBookSearch

        public void TestBookSearch()
        {
            //First step is browse to website and go to search page.
            System.IO.File.WriteAllText("result.txt","");
            driver = new InternetExplorerDriver();
            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl("paratabplus.cloudapp.net");
            driver.FindElementByClassName("menulist").FindElement(By.CssSelector("li a[href=\"/BookSearch/\"]")).Click();
            Assert.AreEqual("Search", driver.Title);
            IWebElement form;
            //-----------------------------------
            /* Next step is find book from define keywords then submit
             * measure time from result that display in grey character on find result(if search result is found.)
             * record it and use these measure data to summarize.
             */
            driver.FindElementByName("Keyword").Clear();
            driver.FindElementByName("Keyword").SendKeys("COM-FL2-2812");
            driver.FindElementByTagName("select").Click();
            driver.Keyboard.SendKeys(Keys.Down);
            driver.Keyboard.SendKeys(Keys.Enter);
            form = driver.FindElementByCssSelector("form[action=\"/BookSearch/Basic\"]");
            form.Submit();
            AssertSearchResult("Call no:COM-FL2-2812");

            driver.FindElementByName("Keyword").Clear();
            driver.FindElementByName("Keyword").SendKeys("Computer");
            driver.FindElementByTagName("select").Click();
            driver.Keyboard.SendKeys(Keys.Down);
            driver.Keyboard.SendKeys(Keys.Enter);
            form = driver.FindElementByCssSelector("form[action=\"/BookSearch/Basic\"]");
            form.Submit();
            AssertSearchResult("Bookname:Computer");

            driver.FindElementByName("Keyword").Clear();
            driver.FindElementByName("Keyword").SendKeys("James");
            driver.FindElementByTagName("select").Click();
            driver.Keyboard.SendKeys(Keys.Down);
            driver.Keyboard.SendKeys(Keys.Enter);
            form = driver.FindElementByCssSelector("form[action=\"/BookSearch/Basic\"]");
            form.Submit();
            AssertSearchResult("Author:James");

            driver.FindElementByName("Keyword").Clear();
            driver.FindElementByName("Keyword").SendKeys("shogakukan");
            driver.FindElementByTagName("select").Click();
            driver.Keyboard.SendKeys(Keys.Down);
            driver.Keyboard.SendKeys(Keys.Enter);
            form = driver.FindElementByCssSelector("form[action=\"/BookSearch/Basic\"]");
            form.Submit();
            AssertSearchResult("Publisher:shogakukan");

            driver.FindElementByName("Keyword").Clear();
            driver.FindElementByName("Keyword").SendKeys("1995");
            driver.FindElementByTagName("select").Click();
            driver.Keyboard.SendKeys(Keys.Down);
            driver.Keyboard.SendKeys(Keys.Enter);
            form = driver.FindElementByCssSelector("form[action=\"/BookSearch/Basic\"]");
            form.Submit();
            AssertSearchResult("Year:1995");

            //-----------------------------------
            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").SendKeys("NOV");
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").SendKeys("Sword Art Online Aincrad");
            driver.FindElementByCssSelector("form input[placeholder=\"Author\"]").SendKeys("Reki Kawahara");
            driver.FindElementByCssSelector("form input[placeholder=\"Publisher\"]").SendKeys("Zenshu");
            driver.FindElementByCssSelector("form[action=\"/BookSearch/Advance\"] input[type=\"submit\"]").Click();
            AssertSearchResult("\r\nCall no:NOV\r\nBookname:Sword Art Online Aincrad\r\nAuthor:Reki Kawahara\r\n" +
                "Publisher:Zenshu\r\nYear:null");

            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").Clear();
            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").SendKeys("PE-FL1-0005");
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").SendKeys("Football training");
            driver.FindElementByCssSelector("form input[placeholder=\"Author\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Author\"]").SendKeys("Graham Taylor");
            driver.FindElementByCssSelector("form input[placeholder=\"Publisher\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Publisher\"]").SendKeys("Leopard Books");
            driver.FindElementByCssSelector("form input[placeholder=\"Year\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Year\"]").SendKeys("1995");
            driver.FindElementByCssSelector("form[action=\"/BookSearch/Advance\"] input[type=\"submit\"]").Click();
            AssertSearchResult("\r\nCall no:PE-FL1-0005\r\nBookname:Football training\r\nAuthor:Graham Taylor\r\n" +
                "Publisher:Leopard Books\r\nYear:1995");

            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").Clear();
            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").SendKeys("MAT");
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").SendKeys("Theory of computation");
            driver.FindElementByCssSelector("form input[placeholder=\"Author\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Author\"]").SendKeys("รศ.ดร.เกียรติกูล เจียรนัยธนะกิจ");
            driver.FindElementByCssSelector("form input[placeholder=\"Publisher\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Year\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Year\"]").SendKeys("2009");
            driver.FindElementByCssSelector("form[action=\"/BookSearch/Advance\"] input[type=\"submit\"]").Click();
            AssertSearchResult("\r\nCall no:MAT\r\nBookname:Theory of computation\r\nAuthor:รศ.ดร.เกียรติกูล เจียรนัยธนะกิจ\r\n" +
                "Publisher:null\r\nYear:2009");

            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").Clear();
            driver.FindElementByCssSelector("input[type=\"text\"][name=\"CallNumber\"]").SendKeys("NOV");
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").Clear();
            driver.FindElementByCssSelector("form input[placeholder=\"Book name\"]").SendKeys("นิทาน");
//.........這裏部分代碼省略.........
開發者ID:worldeditor1,項目名稱:Lib_booksys,代碼行數:101,代碼來源:BookSearchEvaluation.cs

示例13: IETest

        public virtual void IETest()
        {
            if (!NareshScalerSettings.Default.IEEnabled)
                return;

            var driverDir = GetDriverDirectory();

            try
            {
                IEDriver = new InternetExplorerDriver(driverDir);
            }
            catch (Exception)
            {
                // Only for master build
                var masterLibDir = LocateDir(Directory.GetCurrentDirectory(), "lib");
                IEDriver = new InternetExplorerDriver(masterLibDir);
            }

            IEDriver.Manage().Timeouts().ImplicitlyWait(DefaultTimeOutValue);

            try
            {
                RunSeleniumTests(IEDriver);
            }
            catch (Exception e)
            {
                RecordError(IEDriver, CurrentlyRunningTest, e);

                throw;
            }
        }
開發者ID:hunt3ri,項目名稱:NareshScaler,代碼行數:31,代碼來源:NareshScalerTest.cs

示例14: Actions

 static Actions()
 {
     Driver = new InternetExplorerDriver();
     Driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
 }
開發者ID:Kennethtruyers,項目名稱:TodoApp,代碼行數:5,代碼來源:Actions.cs

示例15: factoryMethod

 public override IWebDriver factoryMethod()
 {
     driver = new InternetExplorerDriver();
     driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(10));
     return driver;
 }
開發者ID:Krusn1k,項目名稱:Bdd_test,代碼行數:6,代碼來源:ExplorerDriverCreator.cs


注:本文中的OpenQA.Selenium.IE.InternetExplorerDriver.Manage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。