Exemplo n.º 1
0
 public LoginWindow LoginWithTrialUser()
 {
     EnterUsername(TestUserData.GetTrialUser().Username)
     .EnterPassword(TestUserData.GetTrialUser().Password)
     .ClickLoginButton();
     WaitUntilElementIsNotVisible(By.ClassName("Loading"), 15);
     RefreshSession();
     return(this);
 }
Exemplo n.º 2
0
        public async Task TestInitialize()
        {
            CreateSession();

            var api = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            await api.Login();

            await api.DeleteProfiles();
        }
Exemplo n.º 3
0
 public LoginWindow LoginWithTrialUser()
 {
     EnterUsername(TestUserData.GetTrialUser().Username)
     .EnterPassword(TestUserData.GetTrialUser().Password)
     .ClickLoginButton();
     WaitUntilLoginIsFinished();
     RefreshSession();
     return(this);
 }
Exemplo n.º 4
0
        public async Task <MainWindowResults> CheckIfCorrectIPAddressIsShownAsync()
        {
            var api       = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            var ipAddress = await api.GetIpAddress();

            var textBlockIpAddress = Session.FindElementByAccessibilityId("IPAddressTextBlock").Text.RemoveExtraText();

            Assert.IsTrue(ipAddress.Equals(textBlockIpAddress), "Incorrect IP address is displayed.");
            return(this);
        }
Exemplo n.º 5
0
        public void TestInitialize()
        {
            var dir = Path.GetDirectoryName(typeof(SetUpTests).Assembly.Location);

            Directory.SetCurrentDirectory(dir);

            UITestSession.TestRailClient = new TestRailAPIClient("https://proton.testrail.io/",
                                                                 TestUserData.GetTestrailUser().Username, TestUserData.GetTestrailUser().Password);
            UITestSession.TestRailClient.CreateTestRun("Test run " + DateTime.Now);
        }
Exemplo n.º 6
0
        public void CheckIfUsernameIsDisplayedInAccountSection()
        {
            TestCaseId = 199;

            _loginActions.LoginWithPlusUser();
            _mainWindow.ClickHamburgerMenu()
            .HamburgerMenu.ClickAccount();
            RefreshSession();
            _accountResult.VerifyLoggedInAsTextIs(TestUserData.GetPlusUser().Username);
        }
Exemplo n.º 7
0
    //--------------------------------
    // ユーザーデータリスト読み書きテスト
    //--------------------------------
    void TestForUserDataList()
    {
        List<TestUserData> list = new List<TestUserData>();

        // テストデータ設定
        TestUserData data = new TestUserData();
        data.valInt = 123;
        data.valFloat = 987.654f;
        data.valString = "あ,い,う,え,お\\nかきくけこ\\n\"DQ\"";
        data.arrInt[0] = 444;
        data.arrInt[1] = 555;
        data.arrFloat[0] = 666.666f;
        data.arrFloat[1] = 777.777f;
        data.arrFloat[2] = 888.888f;
        data.arrString[0] = "あいうえお";
        data.arrString[1] = "かきくけこ";
        data.arrString[2] = "さしすせそ";
        data.arrString[3] = "たちつてと";
        list.Add ( data );

        // テストデータ設定
        data = new TestUserData();
        data.valInt = 9123;
        data.valFloat = 9987.654f;
        data.valString = "9,あ,い,う,え,お\\nかきくけこ\\n\"DQ\"";
        data.arrInt[0] = 9444;
        data.arrInt[1] = 9555;
        data.arrFloat[0] = 9666.666f;
        data.arrFloat[1] = 9777.777f;
        data.arrFloat[2] = 9888.888f;
        data.arrString[0] = "9あいうえお";
        data.arrString[1] = "9かきくけこ";
        data.arrString[2] = "9さしすせそ";
        data.arrString[3] = "9たちつてと";
        list.Add ( data );

        // 出力
        BaseData.ReadyForWrite ();
        BaseData.Write ( ref list );
        string strData = BaseData.GetDataString ();
        Debug.Log ( "strData:" + strData );

        // リストを破棄
        list = null;

        // 出力文字列からリストの復元
        BaseData.SetDataString ( strData );
        BaseData.Read ( ref list );

        // 内容確認
        for( int i=0; i<list.Count; i++ ){
            list[i].Dump ( i );
        }
    }
Exemplo n.º 8
0
        public void TestInitialize()
        {
            CreateSession();

            var args    = $"{TestUserData.GetPlusUser().Username} {TestUserData.GetPlusUser().Password}";
            var process = new Process();

            process.StartInfo = new ProcessStartInfo(ProfileCleaner, args);
            process.Start();
            process.WaitForExit();
        }
Exemplo n.º 9
0
        public async Task <MainWindowResults> CheckIfCorrectCountryIsShownAsync()
        {
            var api     = new Api(TestUserData.GetPlusUser().Username, TestUserData.GetPlusUser().Password);
            var country = await api.GetCountry();

            var region = new RegionInfo(country);
            var dashboardRegionName = Session.FindElementByAccessibilityId("EntryCountryAndServer").Text;

            dashboardRegionName = dashboardRegionName.Split('»')[0].Replace(" ", "");
            Assert.IsTrue(dashboardRegionName.Contains(region.DisplayName.Replace(" ", "")), "Incorrect country name is displayed.");
            return(this);
        }
Exemplo n.º 10
0
        public LoginWindow LoginWithTrialUser()
        {
            EnterUsername(TestUserData.GetTrialUser().Username)
            .EnterPassword(TestUserData.GetTrialUser().Password)
            .ClickLoginButton();
            WaitUntilElementExistsByAutomationId("TrialModal", 20);
            Session.FindElementByAccessibilityId("TrialModal").Click();
            var actions = new Actions(Session);

            actions.SendKeys(Keys.Escape).Build().Perform();
            return(this);
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            var url = "http://auth.bungii.ccigoa:8189/api/customer/login";

            string   path = @"E:\test_data_generator\Data.xml";
            SaveData data = new SaveData();

            SaveXML.Getdata(ref data, path);

            foreach (Request request in data.RequestList)
            {
                JObject code = JObject.Parse(request.Payload);

                foreach (var jProperty in code)
                {
                    if (jProperty.Key == "PickupRequestID")
                    {
                        code["PickupRequestID"] = "xyz";
                    }
                    var key   = jProperty.Key;
                    var value = jProperty.Value;
                }
            }



            // int userCount = 1;
            method = new TestUserData(UserAPIList);
            //IEnumerable<object> User = GetUser();
            Console.WriteLine("User signing in...");

            object user = new { PhoneNo = "9999999230", Password = "******" };

            method.BeginInvoke(user, data, url, null, null);

            //foreach (var user in User)
            //{
            //    method.BeginInvoke(user,data,url,null, null);

            //    if (userCount == 5)
            //    {
            //        Thread.Sleep(10000);
            //        userCount = 0;
            //    }

            //    userCount += 1;
            //}

            Console.ReadKey();
        }
Exemplo n.º 12
0
        public void TestInitialize()
        {
            var dir = Path.GetDirectoryName(typeof(SetUpTests).Assembly.Location);

            Directory.SetCurrentDirectory(dir);

            TestRailClient = new TestRailAPIClient(_testRailUrl,
                                                   TestUserData.GetTestrailUser().Username, TestUserData.GetTestrailUser().Password);

            if (!TestEnvironment.AreTestsRunningLocally())
            {
                TestRailClient.CreateTestRun("Test run " + DateTime.Now);
            }
        }
Exemplo n.º 13
0
        public void TestInitialize()
        {
            var dir = Path.GetDirectoryName(typeof(SetUpTests).Assembly.Location);

            Directory.SetCurrentDirectory(dir);

            TestRailClient = new TestRailAPIClient(_testRailUrl,
                                                   TestUserData.GetTestrailUser().Username, TestUserData.GetTestrailUser().Password);
            var asm     = Assembly.GetExecutingAssembly();
            var path    = System.IO.Path.GetDirectoryName(asm.Location) + "/ProtonVpn.exe";
            var version = Assembly.LoadFile(path).GetName().Version.ToString();

            version = version.Substring(0, version.Length - 2);
            if (!TestEnvironment.AreTestsRunningLocally())
            {
                TestRailClient.CreateTestRun(version + " test run " + DateTime.Now);
            }
        }
Exemplo n.º 14
0
 public void FillRegistrationForm(TestUserData user)
 {
     Type(this.FirstName, user.firstName);
     Type(this.LastName, user.lastName);
     ClickOnElements(this.MartialStatus, user.martialStatus);
     ClickOnElements(this.Hobbys, user.hobbys);
     this.CountryOption.SelectByText(user.country);
     this.MounthOption.SelectByText(user.birthMonth);
     this.DayOption.SelectByText(user.birthDay);
     this.YearOption.SelectByText(user.birthYear);
     Type(this.Phone, user.phone);
     Type(this.UserName, user.userName);
     Type(this.Email, user.email);
     this.UploadButton.Click();
     this.Driver.SwitchTo().ActiveElement().SendKeys(user.picture);
     Type(this.Description, user.description);
     Type(this.Password, user.password);
     Type(this.ConfirmPassword, user.confirmPassword);
     this.SubmitButton.Click();
 }
Exemplo n.º 15
0
 public LoginWindow LoginWithVisionaryUser()
 {
     return(PerformLogin(TestUserData.GetVisionaryUser().Username, TestUserData.GetVisionaryUser().Password));
 }
Exemplo n.º 16
0
 public LoginWindow LoginWithBasicUser()
 {
     return(PerformLogin(TestUserData.GetBasicUser().Username, TestUserData.GetBasicUser().Password));
 }
Exemplo n.º 17
0
 public LoginWindow LoginWithAccountThatHasSpecialChars()
 {
     return(PerformLogin(TestUserData.GetUserWithSpecialChars().Username, TestUserData.GetUserWithSpecialChars().Password));
 }
Exemplo n.º 18
0
    //---------------------------------------------------
    // テスト:List<TestUserData>
    //---------------------------------------------------
    // 読み込み
    public static void Read( ref List<TestUserData> list )
    {
        list = new List<TestUserData>();

        // 要素数の読み込み
        int count = 0;
        Read ( ref count );

        // 要素の読み込み
        for( int i=0; i<count; i++ ){
            TestUserData data = new TestUserData();
            data.Read ();
            list.Add ( data );
        }
    }