How to automate web browser activity : Putting username and password in forms.

Lately i was experimenting with different automation libraries in python and found this interesting library called selenium which can do a lot of amazing stuffs.


Below is the code in python , using selenium library to automate stuff.

Here in the code i have automated login to .

import time
from selenium import webdriver
driver = webdriver.Chrome();

iframe = driver.find_elements_by_css_selector(‘iframe’)[0]

iframe2 = driver.find_elements_by_css_selector(‘iframe’)[0]

#Use of two iframe objects is because the form containing input field is inside an iframe which is inside an iframe

username = driver.find_element_by_id(“Email”)
username.send_keys(“You username”)
password = driver.find_element_by_id(“Password”)
password.send_keys(“Your password”)

Modify the code with you own credentials and wow look your code can do things you do daily yourself .

Cheers ! Next post on automating feedback forms filling coming up.

Click here to visit our youtube channel –> CHANNEL

#like #comment #share

Click here to visit our Facebook Page SECTOR443



Stay Safe Stay Secure | Sector443


Leave a Reply

Your email address will not be published. Required fields are marked *