• WebDriverTest


    using OpenQA.Selenium.Firefox;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using OpenQA.Selenium;
    
    namespace WebDriverTest
    {
        class Program
        {
            static void Main(string[] args)
            {
                var driver = new FirefoxDriver();
                driver.Url = "http://192.168.0.252/";
                driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(3);
                driver.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(2);
    
                driver.FindElementById("_easyui_textbox_input1").SendKeys("ERIC");
                driver.FindElementById("_easyui_textbox_input3").SendKeys("ERIC");
    
                Thread.Sleep(TimeSpan.FromSeconds(3));
    
                driver.ExecuteScript("f_Login();");
    
                Thread.Sleep(TimeSpan.FromSeconds(3));
    
                driver.FindElementByCssSelector("[data_funid='1A101']").Click();
    
                IWebElement frameEl = driver.FindElementByTagName("iframe");
    
                driver.SwitchTo().Frame(frameEl);
    
                driver.FindElementById("aAdd").Click();
                driver.FindElementById("_easyui_textbox_input2").SendKeys("Test");
    
    
                //var driver = new FirefoxDriver();
                //driver.Url = "https://www.baidu.com/";
                //driver.FindElementById("kw").SendKeys("WebDriver");
                //driver.FindElementById("su").Click();
    
            }
        }
    }
  • 相关阅读:
    闲置安卓设备搭建Linux服务器实现外网访问
    Flume笔记
    动态规划算法助记
    Hexo 添加Live2D看板娘
    Oracle 助记
    搭建Discuz论坛
    逆向工程(助记)
    PL/SQL Developer连接本地Oracle 11g 64位数据库
    NSOperation的基础
    GCD基础
  • 原文地址:https://www.cnblogs.com/tangchun/p/7217055.html
Copyright © 2020-2023  润新知