当前位置:网站首页>selenium installation and environment configuration firefox
selenium installation and environment configuration firefox
2022-08-02 21:06:00 【Python machine learning model】
Table of Contents
I. Introduction
According to several articles, I summarized my operation process, mainly to record it.
2. Version
1. Check your version of Firefox, in the three horizontal lines in the upper right corner of the browser, help -> About Firefox
2. Select the corresponding selenium driver, my Firefox is the latestI don't know which version to choose. I downloaded the latest geckodriver and successfully drove Firefox.
Driver download address: https://github.com/mozilla/geckodriver/releases/

Three, configuration environment
1. Put the downloaded geckodriver in the root directory of Firefox

2. Configure environment variables
Press the shortcut key win+R, enter "sysdm.cpl", press Enter, select Advanced, enter the environment variable, find the path and double-click to enter.

Copy and paste the downloaded geckivodrer file path into the new one to complete the configuration

Fourth, add selenium to pycharm
1.File—>settings, click the "+" in the upper left corner of the small box to find selenium

Click Install Package

Five, test the code, successfully open Baidu, then the configuration is successful
from selenium import webdriverdriver = webdriver.Firefox()driver.get("http://www.baidu.com")driver.find_element_by_id("kw").send_keys("python")#Locate Baidu's input box and enter pythondriver.find_element_by_id("su").click()Dugua half-hour entry data analysis
边栏推荐
猜你喜欢
随机推荐
Five keys to a successful Industrial IoT deployment
洛谷P1502 窗口的星星
Win11dll文件缺失怎么修复?Win11系统dll文件丢失的解决方法
浅谈混迹力扣和codeforces上的几个月
技术人生 | 如何画业务大图
redis总结_基础
Electronic Industry Inventory Management Pain Points and WMS Warehouse Management System Solutions
Enterprise cloud cost control, are you really doing it right?
From the technical panorama to the actual scene, analyze the evolutionary breakthrough of "narrowband high-definition"
常用随机变量的数学期望和方差
MySQL基本语法
判断文件属主
【软考软件评测师】基于经验的测试技术
golang刷leetcode动态规划(9)不同路径 II
T5: Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
无法超越的100米_百兆以太网传输距离_网线有哪几种?
天翼云4.0来了!千城万池,无所不至!
DevOps之代码检查
编译型语言与解释型语言的区别
mongodb的游标









