当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
指针常量和常量指针概述
Electronic Industry Inventory Management Pain Points and WMS Warehouse Management System Solutions
Five keys to a successful Industrial IoT deployment
golang刷leetcode动态规划(9)不同路径 II
golang刷leetcode滑动窗口(9) 颜色分类
POE交换机全方位解读(下)
力扣 622. 设计循环队列
中断向量表概述
How to mitigate the attack of corporate account hijacking?
记一次 .NET 某工控自动化控制系统 卡死分析
AtomicInteger详解
golang刷leetcode 经典(2)拓扑排序
Go编译原理系列6(类型检查)
golang刷leetcode 经典(3) 设计推特
ROS基本编程概述
Remember the stuck analysis of an industrial automation control system in .NET
cache2go-源码阅读
技术人生 | 如何画业务大图
为何国内年轻人都抢购iPhone,因为它更实惠也更亲民
查看数据库数据量大小,占用磁盘大小









