using System;
using System.Collections.ObjectModel;
// adapted from OpenQA.Selenium
// https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/By.cs
namespace Scraping.Selectors
{
/// Provides a mechanism by which to find elements within a document.
[Serializable]
internal partial class By
{
private string description { get; }
/// Gets or sets the method used to find all elements matching specified criteria.
public Func> FindElementsMethod { get; private set; }
protected By(string description, Func> findElementsMethod)
{
this.description = description;
FindElementsMethod = findElementsMethod;
}
public override string ToString() => description;
}
}