Git Product home page Git Product logo

cchrome's Introduction

CChrome: Chrome driver that ensures load completion

CChrome is a Chrome web driver that provides a method that loads any given web page completely in the current browser session.

Examples

from cchrome import CChrome

cchrome = CChrome()

# Usage of CChrome.get_with_page_completion() is the same as the Chrome.get()
# when optional parameters are left to assume their default values.
cchrome.get_with_page_completion('https://www.nytimes.com')

# Setting of optional parameters is to control the total amount of time allowed in trying to load the given page
# completely and the time allocated in polling for the loading state of the given page.
cchrome.get_with_page_completion('https://www.twitter.com', 3.0, 8.0)

The get method with completion assurance

CChrome.get_with_page_completion(url, page_load_timeout_multiplier=4.0, get_to_complete_timeout=10.0)

Parameters:

  • url - The URL of the web page to be loaded
  • page_load_timeout_multiplier - The multiplier used to set the total allowed page loading time, indirectly. The total allowed page loading time is the value of this parameter times the current page load timeout of this driver. I.e., total allowed page loading time = page_load_timeout_multiplier * cchrome.timeouts.page_load
  • get_to_complete_timeout - The total time allocated for polling for the loading state of the page to reach the state of "complete" since the Chrome.get() method returns after fetching the page. The value of this parameter should be no less than 5.

Return:

This method returns the return of the last call to Chrome.get() that successfully loads the requested page completely.

Raise:

This method raises CChrome.CompletionTimeoutError if the given page fails to be completely loaded within the total allowed page loading time.

cchrome's People

Contributors

candleindark avatar

Watchers

James Cloos avatar  avatar

cchrome's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.