private void btnExit_Click(object sender, EventArgs e) { Login_Page login_Page = new Login_Page(); this.Hide(); login_Page.Show(); }
public void LoginTest() { IWebDriver driver = new ChromeDriver(); driver.Url = ConfigurationManager.AppSettings["URL"]; //Passing the url to the driver Login_Page loginpage = new Login_Page(driver); //Creating the instance of login page Logout_Page logout_Page = new Logout_Page(driver); //creating the instance of logout page var credentials = db.Execute_query(Query); //Getting the result of query into variable foreach (KeyValuePair <String, String> entry in credentials) { loginpage.LoginToApplication(entry.Key, entry.Value); IAlert alert = loginpage.alertHandle(); if (alert == null) { logout_Page.LogoutFromApplication(); loginpage.refresh(); } // loginpage.refresh(); }//end forEach driver.Close(); } //end TestMethod
public void priceListTest() { //instantiate the driver IWebDriver driver = new ChromeDriver(); //call the website driver.Url = Constant.drWebUrl; driver.Manage().Window.Maximize(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); //call Login page to begin login application Login_Page login_Page = new Login_Page(driver); login_Page.LoginApplication(); log.Info("login Complete"); //call the create category application PriceList_Page priceList_Page = new PriceList_Page(driver); priceList_Page.CreateCategoryApplication(); log.Info("Create Category Complete"); //call the cteate new price list code priceList_Page.CreatePriceListApplication(); log.Info("create PriceList Code Complete"); driver.Quit(); }
public void Registertest() { IWebDriver driver = new ChromeDriver(); driver.Url = ConfigurationManager.AppSettings["URL"]; //Passing the url to the driver Login_Page loginpage = new Login_Page(driver); //Creating the instance of login page Logout_Page logout_Page = new Logout_Page(driver); //creating the instance of logout page Register_Page register_Page = new Register_Page(driver); var credentials = db.Execute_query(login_Query); //Getting the result of query into variable foreach (KeyValuePair <String, String> entry in credentials) { loginpage.LoginToApplication(entry.Key, entry.Value); } var register_data = db.Execute_register_query(register_Query); register_Page.add_credentials(register_data["Name"], register_data["Gender"], register_data["DOB"], register_data["Addr"], register_data["City"], register_data["State"], register_data["Pinno"], register_data["Telephoneno"], register_data["EmailID"], register_data["Password"]); int cust_id = register_Page.get_id(); string insert_Query = "insert into add_newaccount(cust_id, initial_deposit) " + "Values('" + cust_id + "', '" + 10000 + "')"; db.Execute_insert_query(insert_Query); register_Page.click_continue_link(); logout_Page.LogoutFromApplication(); driver.Close(); }
private void LoginBtn_Click(object sender, RoutedEventArgs e) { Login_Page lg = new Login_Page(); lg.Owner = this; this.Hide(); lg.ShowDialog(); }
public static void Do_Login() { //BrowserUtility.Instance.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(50); String userName = "******"; String password = "******"; Login_Page.Go_To_Login_Page(); Login_Page.Enter_LoginData(userName, password); Login_Page.Can_Click_Login(); Browser.Instance.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(50); }
private void LogoutLabel_Click(object sender, EventArgs e) { DialogResult result; result = MessageBox.Show("Are you sure you want to Logout?", "Logout", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { this.Close(); Login_Page page = new Login_Page(); page.Show(); } }
private void SignUpBtn_Click(object sender, RoutedEventArgs e) { if (PasswordTexBox1.Password == PasswordTexBox1.Password) { string login = UserNameTextBox.Text; string name = FirsNameTextBox.Text; string email = EmailTexBox.Text; string passw = PasswordTexBox1.Password; DateTime regDate = DateTime.Now; User userSignUp = new User() { Name = name, Login = login, Email = email, Password = passw, RegistrationDate = regDate, RoleId = 1, StatusId = 2, FuncName = "UserSignUp" }; commands.SendUser(userSignUp); //User userSignUp = new User(0, name, login, email, passw, regDate, 1, 2, "UserSignUp"); /* * string ipConnect = "127.0.0.1"; * int port = 1488; * IPAddress ip = IPAddress.Parse(ipConnect); * TcpClient client = new TcpClient(); * client.Connect(ip, port); * * NetworkStream ns = client.GetStream(); * BinaryFormatter bf = new BinaryFormatter(); * bf.Serialize(ns, userSignUp); * * ns.Close(); * client.Close(); */ Login_Page lg = new Login_Page(); lg.Owner = this; this.Hide(); lg.ShowDialog(); } else { MessageBox.Show("Паролі не співпадають"); } }
/// <summary> /// Constructor for main window /// </summary> public MainWindow() { InitializeComponent(); DataContext = this; Core = new Core.Core(); //Core.LoginUser("*****@*****.**", "1111"); //Iniciliazing pages Login_Page = new Login_Page(this); Register_Page = new Register_Page(this); //Iniciliazing frame ShowLoginPage(); //ShowForexPage(); WindowTitle = "Trading forex"; }
public MainWindow() { InitializeComponent(); ServicePointManager.DefaultConnectionLimit = 25; mainFrame.Height = SystemParameters.MaximizedPrimaryScreenHeight - topFrame.Height * 2; sideFrame.Height = mainFrame.Height; mainFrame.Width = SystemParameters.PrimaryScreenWidth * 0.8; sideFrame.Width = SystemParameters.PrimaryScreenWidth * 0.2; topFrame.Width = SystemParameters.PrimaryScreenWidth; ClientData.FrameHeight = mainFrame.Height; ClientData.FrameWidth = mainFrame.Width; ClientData.mainFrame = mainFrame; ClientData.sideFrame = sideFrame; ClientData.toolFrame = topFrame; Login_Page page = new Login_Page(); FormatFunctions.LoadAgentDictionary(); mainFrame.Navigate(page); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Login_Page login = new Login_Page(); login.ShowDialog(); if (login.DialogResult == DialogResult.OK) { login.Dispose(); Application.Run(new Main_Page()); } else if (login.DialogResult == DialogResult.Cancel) { login.Dispose(); return; } }
public void Deletetest() { IWebDriver driver = new ChromeDriver(); driver.Url = ConfigurationManager.AppSettings["URL"]; //Passing the url to the driver driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); Login_Page loginpage = new Login_Page(driver); //Creating the instance of login page Logout_Page logout_Page = new Logout_Page(driver); //creating the instance of logout page Delete_Page delete_Page = new Delete_Page(driver); var credentials = db.Execute_query(login_Query); //Getting the result of query into variable foreach (KeyValuePair <String, String> entry in credentials) { loginpage.LoginToApplication(entry.Key, entry.Value); } delete_Page.click_Deletecustomer_Link(); var result = db.Execute_delete_query(select_Query); delete_Page.enter_CustomerID(result[0]); String delete_Query = "delete from add_newaccount where cust_id = " + Int32.Parse(result[0]); String result1 = db.Execute_delete_query(delete_Query).ToString(); delete_Page.click_Submit(); delete_Page.handleAlert(); logout_Page.LogoutFromApplication(); driver.Close(); }
public void ThenIShouldAbleToDoLogout() { Login_Page.Can_Do_Logout(); }
public void ThenTheDashboardPageShouldOpen() { string title = Login_Page.Return_Title(); Assert.AreEqual("Dashboard", title); }
public void WhenIClickOnLoginButton() { Login_Page.Can_Click_Login(); }
public void GivenIHaveEnteredValidVincent_NguyenMvpstudio_Co_NzValidNtmv(String userName, String password) { Login_Page.Can_Enter_LoginData(userName, password); }
public void GivenIHaveOpenedTheLoginPage() { Login_Page.Go_To_Login_Page(); }
public void GivenLoginUsingOwnersAccountDetails() { Login_Page lpg = new Login_Page(driver); lpg.LoginToApp(); }
public void GivenUserWithLogsIntoThe(string userName, string password, string url) { this.login_Page = new Login_Page(_driver); this.login_Page.gotologinPage(userName, password, url); }
public void Given_User_Logs(string userName, string password, string url) { this.login_Page = new Login_Page(_driver); this.login_Page.gotologinPage(userName, password, url); }
public void GivenUserLogsIntoTheCEClientApplication(string userName) { this.login_Page = new Login_Page(_driver); this.login_Page.gotologinPage(userName); }
public void ThenUserLogsOutOfTheApplication() { login_Page = new Login_Page(_driver); login_Page.signOut(); }
public MainWindow() { InitializeComponent(); Content = new Login_Page(); }
public void the_user_is_navigate_to_login_page() { driver.Navigate().GoToUrl("https://staging-translate.mynextmatch.com/auth/login"); loginPage = new Login_Page(driver); }
public void Then_User_Logs_Out_Of_TheApplication() { login_Page = new Login_Page(_driver); login_Page.signOut(); }
public String Can_getAfterLogin_pageTitle() { Browser.Instance.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(50); return(Login_Page.Return_Title()); }