WebDriver

💭 The WebDriver class offers methods that enable users to obtain a browser object for web automation purposes.

  • clicknium.ie: IE web driver
  • clicknium.chrome: Chrome web driver
  • clicknium.chromecdp: Chrome web driver with Chrome DevTools Protocol(CDP)
  • clicknium.edge: Edge web driver
  • clicknium.edgecdp: Edge web driver with Chrome DevTools Protocol(CDP)
  • clicknium.firefox: Firefox web driver
  • clicknium.chromium(): Chromium based web driver, such as “brave”, “vivaldi” and so on

clicknium.chromecdp” and “clicknium.edgecdp” can run without browser automation extension and support headless mode.

1. Properties #

  • browsers: List[Browser], return all open browsers by current browser type.
  • extensionWebExtension, return the web extenion by current browser type.

2. Methods #

3. Examples #

from clicknium import clicknium as cc

# install chrome extension to automate chrome browser
cc.chrome.extension.install()

# open chrome browser
cc.chrome.open("www.bing.com")

# open chrome browser via CDP
cc.chromecdp.open("www.bing.com")

# open chrome browser via CDP with headless mode
cc.chromecdp.open("www.bing.com", args=["--headless"])

# open chromium based browser
cc.chromium('vivaldi').open("https://www.bing.com", timeout = 10)
cc.chromium('brave').open("https://www.bing.com", timeout = 10)
What are your feelings
Updated on 29 December 2023