selenium python 3.10 tutorial

Spread the love

Selenium package is mostly used for automation like in web browsers. Or in detail, it is an open-source web-based automation tool. Python language is used with selenium for testing and the python API’s empower you to connect with the browser through selenium. Selenium can send the
standard python commands to different browsers, despite variation in their browser’s design.

selenium python 3.10 tutorial
selenium python 3.10 tutorial

Installing selenium in ide:
Pip install selenium

Also read : Class and Object in python

Sample code for selenium with python

from selenium import webdriver
username=”sachedusupport”
password=”sachedus”
url=https://www.facebook.com/
diver=webdriver.Chrome('C:\\Users\\Sachperfect\\Documents\\chromedriver_win32\\chromedriver')
driver.get(url)
driver.find_element_by_id(‘email).send_keys(username)
driver.find_element_by_id(‘pass).send_keys(password)
button = driver.find_element_by_id(‘u_0_b’)
button.click()

Output for selenium with python

This code explain about automation of web browser. I took an example of Facebook Url ,this code is help to open Facebook page and enter username and password and click submit button automatically. Then the account holder page will be opened.
This is how selenium package with python helps for automation.

Also see : Different modules in python

Summary :

In this article we saw selenium python example code so about this section you have any query then free to ask me

I am Mr. Sachin pagar Embedded system engineer, the founder of Pythonslearning, a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

sachin Pagar

I am Mr. Sachin pagar Embedded system engineer, the founder of Pythonslearning, a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

This Post Has One Comment

Leave a Reply