-
-
Save testautomationtribe/b27ea7519da79985f83d803ad3d87976 to your computer and use it in GitHub Desktop.
dash board page object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using OpenQA.Selenium; | |
using OpenQA.Selenium.Support.PageObjects; | |
namespace TatAuto.Pages | |
{ | |
public class DashboardPObject | |
{ | |
[FindsBy(How = How.CssSelector, Using = "#wp-admin-bar-my-account .ab-item")] | |
protected IWebElement UserNameTxt { get; set; } | |
private IWebDriver _driver; | |
public DashboardPObject(IWebDriver driver) | |
{ | |
_driver = driver; | |
PageFactory.InitElements(_driver, this); | |
} | |
/// <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