1. Prerequisites #
1. System Requirements #
Main version | |
---|---|
Python | 3.7, 3.8, 3.9, 3.10, 3.11 |
OS | Windows 11, 10 recommended; Windows 7 SP1* or above |
Note*: Windows 10 is the minimum supported Windows OS for DPI awareness.
2.Code Editor #
- Visual Studio Code
Note*: Ensure that you are signed in with the same account in both the browser and VS Code.Sometimes we notice that we may be signed in to multiple accounts in the browser which may not match the account signed into VSCode Studio. Additionally, when we use the command pip install, it installs the package in the default browser account.
2.Installation #
There are two ways to install the Clicknium extension.
① The first option is to use the command ‘pip install clicknium’ directly in the terminal. ② The second option is to follow the installation guide on the welcome page in VScode Studio.
Both methods are effective, so choose the one that you prefer.After installing the Clicknium extension package, you need to install a browser extension in Chrome, Edge or Firefox – whichever you prefer. Enabling the browser extension is necessary.
(1). installation by command ‘pip install clicknium’ #
- When installing the Clicknum Python package, use the command “pip install clicknium” in the terminal.
- After completing this it will allow you to install a Chrome/Egde/Firefox extension in VSCode.
- Enable the Brower extenion please.
- Example of Edge browser 👉🏻 To Reopen Welcome Page: open the Command Palette: ‘Ctrl+Shift+P’, input ‘
Clicknium:Welcome
‘ . To Enable Edge Extension: Open Edge browser, type'edge://extensions/'
into address bar and enableClicknium Recorder
extension as below:
- Example of Edge browser 👉🏻 To Reopen Welcome Page: open the Command Palette: ‘Ctrl+Shift+P’, input ‘
(2). installation from VScode Studio #
Step1 . Install the Extension (or search Clicknium
in Visual Studio Code Extension marketplace)
Step2. Click ‘CLICKNIUM EXPLORER
‘ in Visual Studio Code Activity Bar
Step3. Follow the welcome page to check the Python environment. Install the Clicknium Python module and ‘pip install clickniumSelect’, as well as the browser extensions. After installation, enable the extension and sign in to start for free.
3.Automation Sample #
Get a sample script showing the automation of the web page and notepad.
1. Setup Sample Project #
- Click ‘
Clicknium: Sample
‘ in Welcome Page. Or invoke the Command Palette by pressing ‘Ctrl+Shift+P’ and input ‘Clicknium: Sample
‘. - Choose a path to locate sample project.
The sample.py contains two automation samples, one is Edge web automation, and the other is notepad automation.
import subprocess
from time import sleep
from clicknium import clicknium as cc, locator, ui
def main():
# sample code to demo web automation and desktop application
cc.config.set_license('your license key')
tab = cc.edge.open("https://www.bing.com/")
tab.find_element(
locator.new_store.sample.bing.search_sb_form_q).set_text('clicknium')
tab.find_element(locator.new_store.sample.bing.svg).click()
sleep(3)
tab.close()
process = subprocess.Popen("notepad")
ui(locator.new_store.sample.notepad.document_15).set_text("clicknium")
if __name__ == "__main__":
main()
- please get your license key by login to https://clicknium.com
2. Run The Sample #
In Visual Studio Code, open sample.py and press ‘Ctrl+F5
‘ to run the script with following steps:
- Open a search engine page
- Input a keyword and click search button
- Open a notepad
- Input text to notepad
Next #
Learn how to start an automation project from zero.
Document Guidelines
For more about Clicknium Visual Studio Code, please refer to here.
You may need to refer Clicknium Python package documents when writing code.
For more tools provided by Clicknium, please refer to:
- Clicknium Recorder.
- Clicknium Browser Extension: Chrome, Edge, Firefox.
- Clicknium Java Extension.