public void UpdateProfile()
        {   //using Chrome
            //using (GlobalDefinitions.driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            //Using Firefox
            using (GlobalDefinitions.driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            {
                string Profile = "Profile";
                //sign in
                SignIn newSignIn = new SignIn();
                newSignIn.LoginSteps();
                //MenuOption to Click
                ClickMenu clickMenu = new ClickMenu();
                clickMenu.clickMenuOptions(Profile);

                //taking screenshot
                SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "BeforeProfileUpdate");

                //Udate the profile
                Profile updateProfile = new Profile();
                updateProfile.EditProfile();

                //taking screenshot
                SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "UpdateProfileSuccessfully");
            }
        }
        public void languageProfile()
        {   //using Chrome
            using (GlobalDefinitions.driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            //Using Firefox
            //using (GlobalDefinitions.driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            {
                string ProfileMenuOption = "Profile";
                string addNewOption      = "Languages";

                //sign in
                SignIn newSignIn = new SignIn();
                newSignIn.LoginSteps();

                //MenuOption to Click
                ClickMenu clickMenu = new ClickMenu();
                clickMenu.clickMenuOptions(ProfileMenuOption);

                //click on options Language, Skills, Education, Certifications
                clickMenu.clickSubMenuOptions(addNewOption);

                //click on Add New button
                ProfileOptions addNewButton = new ProfileOptions();
                addNewButton.clickAddNew(addNewOption);


                //add langauge
                ProfileLanguage addLangauge = new ProfileLanguage();
                addLangauge.addNewLanguage();
                //taking screenshot
                SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "LangaugeAddedSuccessfully");
            }
        }
        public void certificateProfile()
        {   //using Chrome
            using (GlobalDefinitions.driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            //Using Firefox
            //using (GlobalDefinitions.driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            {
                string ProfileMenuOption = "Profile";
                string addNewOption      = "Certifications";

                //sign in
                SignIn newSignIn = new SignIn();
                newSignIn.LoginSteps();

                //MenuOption to Click
                ClickMenu clickMenu = new ClickMenu();
                clickMenu.clickMenuOptions(ProfileMenuOption);

                //click on options Language, Skills, Education, Certifications
                clickMenu.clickSubMenuOptions(addNewOption);

                //click on Add New button
                ProfileOptions addNewButton = new ProfileOptions();
                addNewButton.clickAddNew(addNewOption);

                //add and verify Skill
                ProfileCertification addCertification = new ProfileCertification();
                addCertification.addNewCertification();
                addCertification.rowCertificatePresent();
            }
        }
Beispiel #4
0
        public static void ClickMenuByName(this UIAutomationFacade facade, int processId, string controlName, int timeOut)
        {
            ClickMenu menu = new ClickMenu();

            menu.ProcessId   = processId;
            menu.ControlName = controlName;
            menu.TimeOut     = timeOut;
            menu.Execute(menu);
        }
Beispiel #5
0
        public static void ClickMenuById(this UIAutomationFacade facade, int processId, string automationId, int timeOut)
        {
            ClickMenu menu = new ClickMenu();

            menu.ProcessId    = processId;
            menu.AutomationId = automationId;
            menu.TimeOut      = timeOut;
            menu.Execute(menu);
        }
Beispiel #6
0
        public virtual bool RemoveListenter(ClickMenu menu, UnityAction call)
        {
            RightClickMenuAgent agent = GetAgent(menu);

            if (agent == null)
            {
                return(false);
            }

            agent.RemoveListener(call);
            return(true);
        }
Beispiel #7
0
        public virtual bool AddListenter(ClickMenu agentType, params UnityAction[] calls)
        {
            var agent = GetAgent(agentType);

            if (agent == null)
            {
                return(false);
            }

            agent.AddListener(calls);
            return(true);
        }
Beispiel #8
0
        //Find the agent from agent list by clickmenu
        public RightClickMenuAgent GetAgent(ClickMenu func)
        {
            int count = agents.Count;

            for (int i = 0; i < count; i++)
            {
                if (agents[i].menuType == func)
                {
                    return(agents[i]);
                }
            }

            return(null);
        }
Beispiel #9
0
    static public string ToTextString(this ClickMenu cm)
    {
        switch (cm)
        {
        case ClickMenu.Use:
            return("使用");

        case ClickMenu.Equip:
            return("装备");

        case ClickMenu.Delete:
            return("删除");

        case ClickMenu.Sell:
            return("出售");

        default:
            return("无法解析");
        }
    }
        public void skillProfile()
        {   //using Chrome
            using (GlobalDefinitions.driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            //Using Firefox
            //using (GlobalDefinitions.driver = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            {
                string ProfileMenuOption = "Profile";
                string addNewOption      = "Skills";

                //sign in
                SignIn newSignIn = new SignIn();
                newSignIn.LoginSteps();

                //MenuOption to Click
                ClickMenu clickMenu = new ClickMenu();
                clickMenu.clickMenuOptions(ProfileMenuOption);

                //click on options Language, Skills, Education, Certifications
                clickMenu.clickSubMenuOptions(addNewOption);

                //click on Add New button
                ProfileOptions addNewButton = new ProfileOptions();
                addNewButton.clickAddNew(addNewOption);

                //add and verify Skill
                ProfileSkill addSkill = new ProfileSkill();
                addSkill.addNewSkill();
                addSkill.rowSkillPresent();
            }

            //[AssemblyCleanup]
            //public static void TearDown()
            //{
            //    GlobalDefinitions.driver.Quit();
            //}
        }