Problems encountered using ' Selenium-webdriver-webelement.send_keys '

Source: Internet
Author: User

Use selenium-webdriver-webelement.send_keysProblems encountered

Read a Web page input box and take a string of numbers into the DataFrame read from pandas. Code

forin DF.iloc[:,11]:    ele = browser.find_element_by_xpath("div[1]/div[2]/div/input")    ele.clear()    ele.send_keys(i)

The following issues were encountered:

  File" d:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py ", line 351, in Send_keys {' Text ': "". Join (keys_to_typing (value)), File "D:\ProgramData\Anaconda3\lib\site-packages\selenium \webdriver\common\utils.py ", line-Max, in-keys_to_typing for I in Range (len): Typeerror:object of type ' numpy.int6 4 ' has no Len ()  

Since pandas is based on NumPy, a string of numbers read from DF is naturally of a numpy.int64 type. Therefore, ele.send_keys(i) you will be able to change ele.send_keys(int(i)) .

?

Problems encountered using ' Selenium-webdriver-webelement.send_keys '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.