Example #1
0
 /// <summary>
 /// Constructor that create request with default parameters
 /// </summary>
 /// <param name="url">passed url of web page</param>
 /// <param name="scrapper">passed scrapper of page</param>
 /// <param name="withCookies">save cookies with web request</param>
 /// <param name="withWebProxy">use web proxy with web request</param>
 public CitySharkDriver(string url, CitySharkScrapper scrapper, bool withCookies = false, WebProxy withWebProxy = null)
 {
     Url          = url;
     Scrapper     = scrapper;
     Scrapper.Url = url;
     InitRequest(withCookies, withWebProxy);
 }
Example #2
0
 /// <summary>
 /// Constructor that create firefox driver with default parameters, Inherits base constructor of CitySharkDriver with firefox as browser.
 /// Constructor also calls method NavigateToWebPage from scrapper that navigate browser to passed url
 /// </summary>
 /// <param name="driverPath">passed driver path</param>
 /// <param name="timeSpan">passed timeout that page will be wait until load</param>
 /// <param name="scrapper">custom scrapper that implements BaseScrapper and can extends BaseScrapper abstract class</param>
 /// <param name="url">passed url of page that driver should navigate browser</param>
 /// <param name="options">passed options of web browser if it is set to null it takes default options of web browser</param>
 public CitySharkFirefoxDriver(string driverPath, TimeSpan timeSpan, CitySharkScrapper scrapper, string url,
                               List <string> options = null) : base(
         "firefox",
         driverPath, timeSpan, scrapper, url, options)
 {
     scrapper.NavigateToWebPage(Driver, url);
 }
Example #3
0
 /// <summary>
 /// Constructor that create driver with default parameters and custom scrapper that contains scrapping web page methods
 /// </summary>
 /// <param name="browser">passed browser name</param>
 /// <param name="driverPath">passed driver path</param>
 /// <param name="timeSpan">passed timeout that page will be wait until load</param>
 /// <param name="scrapper">custom scrapper that implements BaseScrapper and can extends BaseScrapper abstract class</param>
 /// <param name="options">passed options of web browser if it is set to null it takes default options of web browser</param>
 protected CitySharkDriver(string browser, string driverPath, TimeSpan timeSpan,
                           CitySharkScrapper scrapper, List <string> options = null)
 {
     TimeOut    = timeSpan;
     Browser    = browser;
     DriverPath = driverPath;
     Options    = options;
     InitDriver();
     Scrapper = scrapper;
 }
Example #4
0
 /// <summary>
 /// Constructor that create firefox driver with default parameters, Inherits base constructor of CitySharkDriver with firefox as browser
 /// </summary>
 /// <param name="driverPath">passed driver path</param>
 /// <param name="timeSpan">passed timeout that page will be wait until load</param>
 /// <param name="scrapper">custom scrapper that implements BaseScrapper and can extends BaseScrapper abstract class</param>
 /// <param name="options">passed options of web browser if it is set to null it takes default options of web browser</param>
 public CitySharkFirefoxDriver(string driverPath, TimeSpan timeSpan, CitySharkScrapper scrapper,
                               List <string> options = null) : base("firefox",
                                                                    driverPath, timeSpan, scrapper, options)
 {
 }
 /// <summary>
 /// Constructor that create chrome driver with default parameters, Inherits base constructor of SharkDriver with chrome as browser
 /// </summary>
 /// <param name="driverPath">passed driver path</param>
 /// <param name="timeSpan">passed timeout that page will be wait until load</param>
 /// <param name="scrapper">custom scrapper that implements BaseScrapper and can extends BaseScrapper abstract class</param>
 /// <param name="options">passed options of web browser if it is set to null it takes default options of web browser</param>
 public CitySharkChromeDriver(string driverPath, TimeSpan timeSpan, CitySharkScrapper scrapper,
                              List <string> options = null) : base("chrome",
                                                                   driverPath, timeSpan, scrapper, options)
 {
 }
Example #6
0
 private CitySharkRequestDriver(string browser, string driverPath, TimeSpan timeSpan, CitySharkScrapper scrapper,
                                string url, List <string> options = null) : base(browser, driverPath, timeSpan, scrapper, url, options)
 {
 }
Example #7
0
 public CitySharkRequestDriver(string url, CitySharkScrapper scrapper, bool withCookies = false,
                               WebProxy withWebProxy = null) : base(url,
                                                                    scrapper, withCookies, withWebProxy)
 {
 }