Click here to Skip to main content
16,015,531 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
from selenium import webdriver
import time
browser=webdriver.Edge("C:/Users/senem/Desktop/selenium/msedgedriver.exe")

browser.get("https://www.instagram.com/")
time.sleep(13)
username=webdriver.Edge.find_element_by_name("username")
password=webdriver.Edge.find_element_by_name("password")


username.send_keys("user")
password.send_keys("password")
time.sleep(10)

browser.close()


What I have tried:

Hello to everyone. This is error message. Can you help me about it?

Traceback (most recent call last):
  File "C:/Users/senem/PycharmProjects/denemefibo/instagram.py", line 8, in <module>
    username=webdriver.Edge.find_element_by_name("name=username")
TypeError: find_element_by_name() missing 1 required positional argument: 'name'
Posted
Updated 18-Nov-20 9:29am

1 solution

See the definiton of find_element_by_name at 7. WebDriver API — Selenium Python Bindings 2 documentation[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900