Пример #1
0
        public void TestCMCCTestPortal(BrowserOp browser)
        {
            XMLUtility xml           = new XMLUtility("./TestPortal.xml");
            string     userName      = xml.readNodeValue("UserName");
            string     pwd           = xml.readNodeValue("PWD");
            string     manufacturer  = xml.readNodeValue("manufacturer");
            string     model         = xml.readNodeValue("model");
            string     packageType   = xml.readNodeValue("packageType");
            string     packageStatus = xml.readNodeValue("packageStatus");

            EditOp.EditInput(browser, "mobile", userName);
            EditOp.EditInput(browser, "password", pwd);
            ButtonOp.buttonClick(browser, "submit");
            Utility.wait(5);
            HyperLinkOp.LinkClick(browser, "包管理");
            //ButtonOp.buttonClick(browser, "A16");
            ButtonOp.buttonClick(browser, "//input[@id='A16' and @value='固件更新包管理']");
            Utility.wait(1);
            ComboBoxOp.ComboBoxItemSelect(browser, "manufacturer", manufacturer);
            Utility.wait(1);
            ComboBoxOp.ComboBoxItemSelect(browser, "model_name", model);
            Utility.wait(1);
            ComboBoxOp.ComboBoxItemSelect(browser, "packageType", packageType);
            Utility.wait(1);
            ComboBoxOp.ComboBoxItemSelect(browser, "packageStatus", packageStatus);

            ButtonOp.buttonClick(browser, "submit2");
        }
Пример #2
0
        static void GoogleLogin(BrowserOp browser, string userName, string PWD)
        {
            HyperLinkOp.LinkClick(browser, "登录");
            EditOp.EditInput(browser, "Email", userName);
            EditOp.EditInput(browser, "Passwd", PWD);
            ButtonOp.buttonClick(browser, "PersistentCookie");
            ButtonOp.buttonClick(browser, "signIn");

            if (browser.AssertStringinSourceCode("您输入的用户名或密码不正确"))
            {
                Console.WriteLine("Login Failed");
            }
            else if (browser.AssertStringinSourceCode("请输入密码"))
            {
                MessageBox.Show("please input your password");
            }
            else if (browser.AssertStringinSourceCode("请输入电子邮件地址"))
            {
                Console.WriteLine("please input your account");
            }
            else if (browser.AssertStringinSourceCode("输入上图中显示的字母"))
            {
                Console.WriteLine("My God!");
            }
        }
Пример #3
0
 public static void OdomainAddNotification(BrowserOp browser)
 {
     ButtonOp.buttonClick(browser, "//a[1]/img");
     ButtonOp.buttonClick(browser, "//tr[@id='menu21']/td/a/img");
     browser.SwitchFrame("cfrm");
     ButtonOp.buttonClick(browser, "//a[@id='profileNoticeAdd']/img");
     EditOp.EditInput(browser, "noticeName", "test");
     RadioOp.RadioSelect(browser, "remindUser", "true");
     EditOp.EditInput(browser, "userNotice", "ivangeng");
     ButtonOp.buttonClick(browser, "imageField");
     Console.WriteLine(browser.AssertStringinSourceCode("成功创建"));
 }
Пример #4
0
 static void TestSelfCare(BrowserOp browser)
 {
     EditOp.EditInput(browser, "mobile", "root");
     EditOp.EditInput(browser, "password", "111111");
     ButtonOp.buttonClick(browser, "submit");
     Utility.wait(2);
     HyperLinkOp.LinkClick(browser, "客户问题");
     Utility.wait(5);
     ButtonOp.buttonClick(browser, "start");
     Utility.wait(5);
     ButtonOp.buttonClick(browser, "//div[3]/table/tbody/tr[1]/td[4]");
 }
Пример #5
0
 public static void FindFlight()
 {
     EditOp.EditInput("Flight Reservation", "__/__/__", "11/11/11");
     Utility.wait(2);
     ComboBoxOp.ComboBoxItemSelect("Flight Reservation", "1003", "Frankfurt");
     ComboBoxOp.ComboBoxItemSelect("Flight Reservation", "2004", "Los Angeles");
     ButtonOp.buttonClick("Flight Reservation", "FLIGHT");
     ListItemOp.ListItemSelect("Flights Table", "20330");
     ButtonOp.buttonClick("Flights Table", "OK");
     EditOp.EditInput("Flight Reservation", "1014", "Ivan");
     ButtonOp.buttonClick("Flight Reservation", "Insert Order");
     ButtonOp.buttonClick("Flight Reservation", "6");
     Console.WriteLine(EditOp.Exsit("Flight Reservation", "Class:"));
 }
Пример #6
0
 static void SimulatorInit(string Man, string Model, string Version, string ID, string phoneNumber)
 {
     ButtonOp.buttonClick("mProveDM Simulator", "Setting");
     EditOp.EditInput("mProveDM Simulator", "Man:", Man);
     EditOp.EditInput("mProveDM Simulator", "Model:", Model);
     EditOp.EditInput("mProveDM Simulator", "Version:", Version);
     EditOp.EditInput("mProveDM Simulator", "DeviceID:", ID);
     EditOp.EditInput("mProveDM Simulator", "PhoneNum:", phoneNumber);
     ButtonOp.buttonClick("mProveDM Simulator", "Apply");
     ButtonOp.buttonClick("mProveDM Simulator", "OK");
     ButtonOp.buttonClick("mProveDM Log Dialog", "Clear");
     // System.Windows.Point p = new System.Windows.Point(839, 471);
     // CustomControl.buttonClick("mProveDM Simulator", p);
 }
Пример #7
0
 static void TestPortalAddUser(BrowserOp browser, string userName, string PWD)
 {
     HyperLinkOp.LinkClick(browser, "用户信息管理");
     ButtonOp.buttonClick(browser, "A13");
     ButtonOp.buttonClick(browser, "//input[@value='添加包测试用户']");
     EditOp.EditInput(browser, "username", userName);
     EditOp.EditInput(browser, "password", PWD);
     EditOp.EditInput(browser, "confirmpassword", PWD);
     ButtonOp.buttonClick(browser, "Submit");
     Utility.wait(5);
     if (browser.AssertStringinSourceCode("您添加的用户已经存在系统中"))
     {
         Console.WriteLine("User existed!");
     }
     else
     {
         Console.WriteLine("Add success");
     }
 }
Пример #8
0
 public string FindFlight()
 {
     while (EditOp.Exsit("Flight Reservation", "__/__/__") == false)
     {
         Utility.wait(2);
     }
     EditOp.EditInput("Flight Reservation", "__/__/__", "11/11/11");
     ComboBoxOp.ComboBoxItemSelect("Flight Reservation", "1003", "Frankfurt");
     ComboBoxOp.ComboBoxItemSelect("Flight Reservation", "2004", "Los Angeles");
     ButtonOp.buttonClick("Flight Reservation", "FLIGHT");
     ListItemOp.ListItemSelect("Flights Table", "20330");
     ButtonOp.buttonClick("Flights Table", "OK");
     EditOp.EditInput("Flight Reservation", "1014", "Ivan");
     EditOp.EditInput("Flight Reservation", "1029", "3");
     RadioOp.RadioSelect("Flight Reservation", "Business");
     ButtonOp.buttonClick("Flight Reservation", "Insert Order");
     Utility.wait(10);
     return(EditOp.EditOutput("Flight Reservation", "1016"));
 }
Пример #9
0
        public void FlexTest()
        {
            string windowname = "Internet Explorer";

            // string windowname = "Mozilla Firefox";
            Utility.wait(10);

            Console.WriteLine(EditOp.EditInput(windowname, "Form Heading Text Input:", "beijing"));

            Console.WriteLine(EditOp.EditInput(windowname, "Form Heading Text Area:", "ivan"));

            CheckboxOp.CheckBoxOn(windowname, "Form Heading Checkboxes: Checkbox 1");

            CheckboxOp.CheckBoxOn(windowname, "Form Heading Checkboxes: Checkbox 2");

            RadioOp.RadioSelect(windowname, "Form Heading Radio Group: Radio Button 2 2 of 2");

            ComboBoxOp.ComboBoxItemSelect(windowname, "Form Heading Combo Box:", "Item 1");


            //Form Heading Button Form Heading Button
            //FlashSelenium.FlashSelenium flex = new FlashSelenium.FlashSelenium(
            // Console.WriteLine(ButtonOp.buttonClick(windowname, "Form Heading Button"));
            //  KeyboardOp.sendKey(" ");
            // Utility.wait(2);
            //ButtonOp.buttonClick("Alert", "OK");



            EditOp.EditInput(windowname, "Text Input T1: Text Input T1:", "10025");
            EditOp.EditInput(windowname, "Text Input A1: Text Input A1:", "fadsfdasfa");

            //TabOp.TabSwitch(windowname, "", "Tab 2");

            Console.WriteLine(TabOp.TabSwitch(windowname, "Accordion Pane 3"));
//Console.WriteLine(TabOp.TabSwitch(windowname, "Accordion Pane 2"));
            //Utility.wait(5);
        }
Пример #10
0
 static void TestPortalLogin(BrowserOp browser, string userName, string PWD)
 {
     EditOp.EditInput(browser, "msisdn", userName);
     EditOp.EditInput(browser, "pwd", PWD);
     ButtonOp.buttonClick(browser, "submit");
 }
Пример #11
0
 static void TestVB()
 {
     //Console.WriteLine(EditOp.GetEditName("电话号码查询"));
     Console.WriteLine(EditOp.EditInput("电话号码查询", "11", "123"));
     ButtonOp.buttonClick("电话号码查询", "查询");
 }
Пример #12
0
 public void Login(string userName, string PWD)
 {
     EditOp.EditInput("Login", "3001", userName);
     EditOp.EditInput("Login", "2000", PWD);
     ButtonOp.buttonClick("Login", "OK");
 }
Пример #13
0
 public void Login(BrowserOp browser, string userName, string PWD)
 {
     EditOp.EditInput(browser, "userName", userName);
     EditOp.EditInput(browser, "password", PWD);
     ButtonOp.buttonClick(browser, "login");
 }