How to use ElementLocator method of Ocaramba.Tests.NUnitExtentReports.PageObjects.DropdownPage class

Best Ocaramba code snippet using Ocaramba.Tests.NUnitExtentReports.PageObjects.DropdownPage.ElementLocator

InternetPage.cs

Source:InternetPage.cs Github

copy

Full Screen

...34 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger();35 /// <summary>36 /// Locators for elements37 /// </summary>38 private readonly ElementLocator39 linkLocator = new ElementLocator(Locator.CssSelector, "a[href='/{0}']"),40 basicAuthLink = new ElementLocator(Locator.XPath, "//a[contains(text(),'Auth')]"),41 dropdownPageByLinkTextLocator = new ElementLocator(Locator.LinkText, "Dropdown"),42 partialLinkTextLocator = new ElementLocator(Locator.PartialLinkText, "Drag");43 public InternetPage(DriverContext driverContext)44 : base(driverContext)45 {46 }47 /// <summary>48 /// Methods for this HomePage49 /// </summary>50 /// <returns>Returns HomePage</returns>51 public InternetPage OpenHomePage()52 {53 var url = BaseConfiguration.GetUrlValue;54 this.Driver.NavigateTo(new Uri(url));55 Logger.Info(CultureInfo.CurrentCulture, "Opening page {0}", url);56 return this;...

Full Screen

Full Screen

DropdownPage.cs

Source:DropdownPage.cs Github

copy

Full Screen

...28 using Ocaramba.Types;29 using Ocaramba.WebElements;30 public class DropdownPage : ProjectPageBase31 {32 private readonly ElementLocator dropDownLocator = new ElementLocator(33 Locator.Id, "dropdown");34 public DropdownPage(DriverContext driverContext)35 : base(driverContext)36 {37 }38 39 public void SelectByIndex(int index)40 {41 ExtentTestLogger.Debug("DropdownPage: Selecting element on dropdown by index: " + index);42 Select select = this.Driver.GetElement<Select>(this.dropDownLocator, 300);43 select.SelectByIndex(index);44 }45 public void SelectByValue(string value)46 {...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Ocaramba automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful