Ads Area

How To Install Selenium & Chromium in Android (Termux)



Video Link:

Installation:

apt update
apt upgrade
termux-setup-storage
pkg install python
pip install selenium==4.9.1
yes | pkg install x11-repo -y
yes | pkg install tur-repo -y
yes | pkg install chromium -y

Installed Successfully

Now you can test your Selenium App.

Github Link: https://github.com/luanon404/Selenium-On-Termux-Android

Sample Code (Headless Chromium):

from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--headless=new")
driver = webdriver.Chrome(options=options)
driver.get("https://www.google.com")
driver.save_screenshot("/sdcard/download/screenshot.png")
print("Please check screenshot image")
driver.quit()
Tags

Post a Comment

0 Comments

Top Post Ad

Below Post Ad