I can not auto login to www.sahibinden.com

88 views
Skip to first unread message

Cemal Aydın

unread,
Feb 6, 2020, 7:32:24 AM2/6/20
to Selenium Users
Hi there, Hi there, i want to login automatic sahibinden.com. Then i wrote this code. Code is working, code is clicking the login button but website does not login. But when i click the button manual it does login. Whats the problem ?


from selenium.webdriver import Chrome
import time
browser = Chrome(r"C:\Users\Dell\Desktop\lol/chromedriver.exe")

time.sleep(5)
email = browser.find_element_by_id("username")
password = browser.find_element_by_id("password")
login = browser.find_element_by_id("userLoginSubmitButton")
time.sleep(5)
email.send_keys("b...@bla.com.tr")
password.send_keys("blabla")
login.click()
time.sleep(33)
browser.close()

https://prnt.sc/qws30f - website

Joe Ward

unread,
Feb 6, 2020, 7:42:58 AM2/6/20
to seleniu...@googlegroups.com
All those instances if you calling Thread.sleep aren’t exactly brilliant but to answer your question we’d probably need to see the html and not a screenshot and any errors you’re receiving instead of a narrative description. 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8e2bab18-a8c9-47d0-bfa6-7eb01d7d1acd%40googlegroups.com.

Sai Krishna Pulivarthi

unread,
Feb 6, 2020, 7:46:07 AM2/6/20
to seleniu...@googlegroups.com
Try to add a couple of sleep seconds after  password.send_keys("blabla").

password.send_keys("blabla")
time.sleep(2) 
login.click()


Reply all
Reply to author
Forward
0 new messages