Skip to content

Instantly share code, notes, and snippets.

@testautomationtribe
Created August 21, 2016 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save testautomationtribe/b1cac5cb954cb6745ccdbfbc70b58110 to your computer and use it in GitHub Desktop.
Save testautomationtribe/b1cac5cb954cb6745ccdbfbc70b58110 to your computer and use it in GitHub Desktop.
using OpenQA.Selenium;
using OpenQA.Selenium.Support.PageObjects;
namespace TatAutomationFramework.Web.Pages
{
public class DashBoardHeaderPObject
{
[FindsBy(How = How.CssSelector, Using = "#wp-admin-bar-my-account .ab-item")]
protected IWebElement UserNameTxt { get; set; }
/// <summary>
/// Get Displayed User Name
/// </summary>
/// <returns></returns>
public string GetUser()
{
return UserNameTxt.Text;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment