Python Forum
Why my python code is throwing several errors?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why my python code is throwing several errors?
#1
from selenium import webdriver  
import time

driver=webdriver.Firefox()
time.sleep(3)
driver.minimize_window()
time.sleep(3)
driver.get("http://www.facebook.com")
time.sleep(3)
usr=input("Enter your username or Email \n")
pwd=input("Enter your password \n")
time.sleep(5)
username=driver.find_element_by_id("email")
username.send_keys(usr)
time.sleep(3)
password=driver.find_element_by_id("pass")
password.send_keys(pwd)
time.sleep(3)
login=driver.find_element_by_id("u_0_2")
login.click()
Reply
#2
Please use Python tags when posting code. I added them for you this time. See the BBCode link in my signature below for instructions.

What errors is your code raising? Please give the full text of the traceback.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
I executed this code and I found no errors. Code is executing smoothly. I think you should check whether the selenium webdriver is installed or not in your system. If not installed first install it first and rerun the code.
You can install selenium from the given link - Install Selenium for Pyhton
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  When i try to create a webserver through a port throwing error pras120687 2 5,784 Dec-14-2016, 01:06 AM
Last Post: pras120687

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020