0

I am trying to fill out a login form on https://login.alibaba.com/?spm=a2700.8293689.0.0.EKYnH1&tracelog=hd_signin. However i am unable to fill out the login form. Here is my current code.

executable_path = 
{'executable_path':'path/to/chrome/on/my/pc'}

browser = Browser('chrome', **executable_path)
browser.visit('https://alibaba.com')


my_acc = browser.find_link_by_partial_text("My Account")
for i in my_acc:
    browser.visit(i['href'])

browser.find_by_name('loginId').first.type('Steve Jobs')

I have checked the html code, and there is clearly an element with the name i am looking for, however i get the following error:

splinter.exceptions.ElementDoesNotExist: no elements could be found with name "loginId"
Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
sn3jd3r
  • 496
  • 2
  • 18

1 Answers1

0

Probably page didn't fully load when selenium trying to access element. As option you could use sleep function.

import time
time.sleep(5) # delay for 5 seconds

Also you can check this for Selenium

http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-implicit-waits