当前位置: 首页>>代码示例>>C#>>正文


C# ISelenium.Open方法代码示例

本文整理汇总了C#中ISelenium.Open方法的典型用法代码示例。如果您正苦于以下问题:C# ISelenium.Open方法的具体用法?C# ISelenium.Open怎么用?C# ISelenium.Open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISelenium的用法示例。


在下文中一共展示了ISelenium.Open方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost");
     selenium.Start();
     selenium.Open("http://localhost");
     silvernium = new Silvernium(selenium, "Test");
 }
开发者ID:kasq,项目名称:silverlight-selenium,代码行数:7,代码来源:SilverniumIntegrationTests.cs

示例2: SetupClass

        public void SetupClass()
        {
            base.StartServer();
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["baseUrl"]);
            selenium.Start();
            verificationErrors = new StringBuilder();

            selenium.DeleteAllVisibleCookies();

            selenium.Open("/dna/mbfood/");
            // To Do
            // too general, could crash test if a topic happened to have the wrong name 
            Assert.IsFalse(selenium.IsTextPresent("error"));
            Assert.IsFalse(selenium.IsTextPresent("There has been a problem"));

            selenium.Click("link=Sign in");
            selenium.Click("bbcid_username");
            selenium.Type("bbcid_username", "mpgsuper");
            selenium.Type("bbcid_password", "ratbags");
            selenium.Click("signin");
            selenium.WaitForPageToLoad("30000");

            // going this way so as to be certain to get the right site options without thinking about it
            selenium.Click("link=Site Options");
            selenium.WaitForPageToLoad("30000");

            // check a) where we are b) BBC site requirements for page titles https://confluence.dev.bbc.co.uk/display/DNA/Meta+Data - note that this title breaks those guidelines
            Assert.AreEqual("BBC - Food - DNA Administration - Site Options - Food", selenium.GetTitle());
            Assert.IsTrue(selenium.IsElementPresent("//input[@name='sov_49_General_CustomBarlesquePath']");

            stateOfOption = selenium.GetValue("//input[@name='so_49_General_CustomBarlesquePath' and @type='radio' and @checked='']/@value");
            valueOfOption = selenium.GetValue("//input[@name='so_49_General_CustomBarlesquePath' and @type='text']");
        }
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:33,代码来源:CustomBarlesque.cs

示例3: Init

        public void Init()
        {
            //Deleting cookies in ie browser through command line.
            /*var procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2");
            var proc = new System.Diagnostics.Process { StartInfo = procStartInfo };
            proc.Start();
            WebDriverObj = new InternetExplorerDriver();
            */
            string URL = "https://stg-gib.ladbrokes.com/admin";
            WebDriverObj = new FirefoxDriver();
            MyBrowser = new WebDriverBackedSelenium(WebDriverObj, URL);
            MyBrowser.Start();
            WebDriverObj.Manage().Window.Maximize();
            MyBrowser.WindowMaximize();

            MyBrowser.Open(URL);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Refresh();
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Type(TestDataCreation.ControlsRepository.UsrNmeTxtBx, "Automation1");
            MyBrowser.Type(TestDataCreation.ControlsRepository.PwdTxtBx, "aditi123");
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Click(TestDataCreation.ControlsRepository.LoginBtn);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
        }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:25,代码来源:TestDataBase.cs

示例4: SetUp

 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", URL);
     selenium.Start();
     selenium.Open(URL);
     silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
 }
开发者ID:kasq,项目名称:silverlight-selenium,代码行数:7,代码来源:SilverNibblesTest.cs

示例5: Home

 /// <summary>
 /// Instantiates a new Home Page object. Pass in the Selenium object created in the test SetUp(). 
 /// When the object in instantiated it will navigate to the root
 /// </summary>
 /// Selenium Object created in the tests
 public Home(ISelenium selenium)
 {
     this._selenium = selenium;
     if (!selenium.GetTitle().Contains("home"))
     {
         selenium.Open("/");
     }
     selenium.WindowMaximize();
 }
开发者ID:AutomatedTester,项目名称:Presentations,代码行数:14,代码来源:Home.cs

示例6: SetupTest

        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*firefox", url);
            selenium.SetSpeed("1000");
            selenium.Start();
            verificationErrors = new StringBuilder();
            selenium.Open("");
            selenium.WindowMaximize();

            //selenium.KeyDown(ID, "13");//enter key
        }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:11,代码来源:TestBase.cs

示例7: SetupTest

        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();
            verificationErrors = new StringBuilder();

            selenium.Open("/");
			selenium.Type("id=loginPassword", "lex");
			selenium.Type("id=loginUsername", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
        }
开发者ID:supermuk,项目名称:iudico,代码行数:12,代码来源:UniqueUserId.cs

示例8: Google_For_SimpleTalk

        public void Google_For_SimpleTalk(SeleniumProvider seleniumProvider)
        {
            Browser = seleniumProvider.GetBrowser();

            Browser.Open("/");
            Browser.Type("q", "Simple Talk");
            Browser.Click("btnG");

            Browser.WaitForPageToLoad("3000");

            Assert.True(Browser.IsTextPresent("www.simple-talk.com"));
        }
开发者ID:benadderson,项目名称:xUnitBrowserTheoriesForSelenium,代码行数:12,代码来源:Example.cs

示例9: TestMethod3

 public void TestMethod3()
 {
     string URL = "http://www.abb.com";
     selenium = new DefaultSelenium("localhost", 4444, "*firefox", URL);
     selenium.Start();
     selenium.Open("/");
     Assert.AreEqual("The ABB Group - Automation and Power Technologies", selenium.GetTitle());
     selenium.Type("searchInput", "Robot");
     selenium.Click("search");
     selenium.WaitForPageToLoad("10000");
     Assert.AreEqual("The ABB Group", selenium.GetTitle());
     Assert.AreEqual("Robot", selenium.GetValue("searchInput"));
 }
开发者ID:shivanisharma,项目名称:test,代码行数:13,代码来源:UnitTest1.cs

示例10: Login

        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "lex");
            selenium.Type("id=loginPassword", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("//a[contains(@href, 'UserActivity/Index')]");
            selenium.WaitForPageToLoad("30000");
        }
开发者ID:supermuk,项目名称:iudico,代码行数:13,代码来源:SecuritySeleniumTester.cs

示例11: Login

        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "prof");
            selenium.Type("id=loginPassword", "prof");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("link=Courses");
            selenium.WaitForPageToLoad("30000");
        }
开发者ID:supermuk,项目名称:iudico,代码行数:13,代码来源:StudentRole.cs

示例12: Init

 public void Init()
 {
     FfDriver = new FirefoxDriver();
     MyBrowser = new WebDriverBackedSelenium(FfDriver, "https://stg-gib.ladbrokes.com/admin");
     MyBrowser.Start();
     MyBrowser.Open("https://stg-gib.ladbrokes.com/admin");
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
     MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.UsrNmeTxtBx, "sanjeeva_p");
     MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.PwdTxtBx, "123456");
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
     MyBrowser.Click(AdminSuite.CommonControls.AdminHomePage.LoginBtn);
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
 }
开发者ID:hemap,项目名称:PhoenixAutomationRepo,代码行数:13,代码来源:AdminBase.cs

示例13: Login

        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["SELENIUM_URL"]);
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "prof");
            selenium.Type("id=loginPassword", "prof");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("40000");
            selenium.Click("link=Courses");
            selenium.WaitForPageToLoad("40000");
        }
开发者ID:supermuk,项目名称:iudico,代码行数:13,代码来源:StudentRole.cs

示例14: Login

        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["SELENIUM_URL"]);
                selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "lex");
            selenium.Type("id=loginPassword", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("//a[contains(@href, 'UserActivity/Index')]");
            selenium.WaitForPageToLoad("30000");
        }
开发者ID:supermuk,项目名称:iudico,代码行数:13,代码来源:SecuritySeleniumTester.cs

示例15: StartSelenium

        public void StartSelenium()
        {
            verificationErrors = new StringBuilder();

            string platform = System.Configuration.ConfigurationManager.AppSettings["Platform"];
            this.URL = System.Configuration.ConfigurationManager.AppSettings["TestURL"];
            //get un/pw from db
            //this.UN = "";
            //this.PW = "";

            selenium = new DefaultSelenium("localhost", 4444, platform, this.URL);
            //selenium = new DefaultSelenium("localhost", 4444, "*firefox3 C:\\Program Files\\Mozilla Firefox\\firefox.exe", "http://dev.lofinc.net");
            selenium.Start();
            Thread.Sleep(5000);
            selenium.WindowMaximize();

            selenium.SetTimeout("0");
            selenium.Open("/admin/");
            this.selenium.WaitForPageToLoad("5000");
        }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:20,代码来源:TestBase.cs


注:本文中的ISelenium.Open方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。