-
Notifications
You must be signed in to change notification settings - Fork 131
Page Object class
Jakub Raczek edited this page May 6, 2016
·
15 revisions
namespace Objectivity.Test.Automation.Tests.PageObjects.PageObjects.TheInternet
{
using System;
using System.Globalization;
using NLog;
using Objectivity.Test.Automation.Common;
using Objectivity.Test.Automation.Common.Extensions;
using Objectivity.Test.Automation.Common.Types;
using Objectivity.Test.Automation.Tests.PageObjects;
public class InternetPage : ProjectPageBase
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
/// <summary>
/// Locators for elements
/// </summary>
private readonly ElementLocator
linkLocator = new ElementLocator(Locator.CssSelector, "a[href='/{0}']");
public InternetPage(DriverContext driverContext) : base(driverContext)
{
}
/// <summary>
/// Methods for this HomePage
/// </summary>
public InternetPage OpenHomePage()
{
var url = BaseConfiguration.GetUrlValue;
this.Driver.NavigateTo(new Uri(url));
Logger.Info(CultureInfo.CurrentCulture, "Opening page {0}", url);
return this;
}
public FormAuthenticationPage GoToFormAuthenticationPage()
{
this.Driver.GetElement(this.linkLocator.Format("login")).Click();
return new FormAuthenticationPage(this.DriverContext);
}
}
}
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support