Beispiel #1
0
		public void Test001_RegisteredUserUploadsAvatar()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Registered User uploads Avatar'");

			var loginPage = new LoginPage(_driver);
			loginPage.LoginUsingDirectUrl(_baseUrl, _registeredUserName, _registeredUserPassword);

			var manageUserProfilePage = new ManageUserProfilePage(_driver);
			manageUserProfilePage.OpenUsingLink(_baseUrl);

			manageUserProfilePage.AddProfileAvatar(_avatarFileToUpload);

			var userAccountPage = new UserAccountPage(_driver);
			userAccountPage.OpenUsingLink(_baseUrl);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT avatar file is loaded correctly");

			userAccountPage.WaitForElement(By.XPath(ManageUserProfilePage.ProfilePhoto)).Info();
			Assert.That(manageUserProfilePage.WaitForElement(By.XPath(ManageUserProfilePage.ProfilePhoto)).GetAttribute("src"), Is.StringContaining(_avatarFileToUpload),
						"The User Avatar is not added correctly");
		}