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();
driver.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(); driver.FindElementById("_easyui_textbox_input1").SendKeys("ERIC");
driver.FindElementById("_easyui_textbox_input3").SendKeys("ERIC"); Thread.Sleep(TimeSpan.FromSeconds()); driver.ExecuteScript("f_Login();"); Thread.Sleep(TimeSpan.FromSeconds()); 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(); }
}
}
上一篇:bzoj 5212: [Zjoi2018]历史


下一篇:javascript 中 arguments.callee属性