public void PopulatePageAndSubmit()
 {
     FirstName.SendKeys("Miller");
     LastName.SendKeys("John");
     UserEmail.SendKeys("*****@*****.**");
     Gender.Click();
     MobileNumber.SendKeys("0751123456");
     DateOfBirth.Click();
     Month.Click();
     Year.Click();
     Day.Click();
     Subjects.SendKeys("Test subjects");
     Thread.Sleep(2000);
     Hobbies.Click();
     ((IJavaScriptExecutor)_driver).ExecuteScript("arguments[0].scrollIntoView(true);", Picture);
     //Thread.Sleep(5000);
     //Picture.Click();
     CurrentAddress.SendKeys("Str. 13 Dec");
     Thread.Sleep(2000);
     StateDropDown.Click();
     StateOption.Click();
     CityDropDown.Click();
     CityOption.Click();
     Submit.Click();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         // In a real-world scalable web site, this data would be cached.
         StateDropDown.DataSource = ZipLookupService.GetStates();
         StateDropDown.DataBind();
     }
 }
示例#3
0
文件: Add.aspx.cs 项目: jbvera/WOS
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!User.IsInRole("Librarian"))
     {
         Response.Redirect(SitePages.GetUrl(LibraryPage.NotAuthorized));
     }
     if (!IsPostBack)
     {
         StateDropDown.ListDataSource = () =>
         {
             DataTable states = DatabaseHelper.Retrieve(GetStatesQuery);
             StateDropDown.SetTextAndValueFields("Abbreviation", "Id");
             return(states);
         };
     }
 }
 public void LoadStatesList(IEnumerable <State> states)
 {
     StateDropDown.DataSource = states;
     StateDropDown.DataBind();
 }
 public void LoadStates(CustomersDataSet.StatesDataTable states)
 {
     StateDropDown.DataSource = states;
     StateDropDown.DataBind();
 }