Summary--problems encountered during the course of study and practice

Source: Internet
Author: User

1. Report invisible exception element is not currently visible and so can not be interacted with (answer set for single choice)

That is, the element's style or parent and the above elements contain non-display properties, so that in some browsers (Firefoxdriver), it is visible and available in a normal browser. You can detect whether an element can be displayed by means of the element object's method Isdisplayed ().

In the positioning of the front end saw is hidden, but did not realize that, after the error, remove the last part of the location of the hidden tag, you can operate the

2. Assignment of date control (course start time)

Date Popup control is an IFRAME, but after switch_to.frame operation is always unsuccessful, so developed to another idea, write JS direct assignment, but also to avoid the operation date control will appear problems. Query Baidu to give the solution is to remove the ReadOnly attribute of input, look at the front end of the ReadOnly attribute assignment is empty, not true, so I tried, do not remove the ReadOnly direct assignment is OK, but a focus, date control pops up, After the assignment loses the focus will appear undefined, looked at the front end input onfocus attribute has the value, therefore removed this property to assign the value, did not have the date control again, OK succeeds assigns the value

1 # Suggested learning Time 2 " var Setdate=document.getelementbyid (\ "studytime\"); Setdate.removeattribute (' onfocus '); " 3 driver.execute_script (Timejs) 4 driver.find_element_by_id ("studytime"). Send_keys ("  2016-08-22")

Summary--problems encountered during the course of study and practice

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.