Python + Selenium automation environment Frequently asked Questions summary

Source: Internet
Author: User

python + Selenium automation environment Frequently Asked Questions summary

(1) There are three ways to operate the Windows window, one is to use the AutoIT software to generate exe programs, and then use the system command calls; SendKeys class simulates the keyboard operation (only the current focus is fixed); Pywinauto Components ( Win32gui )

(2) Pywinauto package only supports to python2.6 version. the SendKeys package cannot be successfully installed on the python3.0 version.

(3) when executing the assertion checksum of the use case, the Text property of the element is generally obtained , sometimes the text value of the element is viewed on the page , and the obtained is empty. At this point, you need to refresh the page first, and then get the text property, you can generally get success.

(4) some intermediate commands in the execution of the operation will fail, if not the command error, you can consider adding the appropriate waiting time between the commands, it can be done smoothly, such as the input box, pop-up Windows window after calling exe programs and so on.

(5)type isInputDrop- down selection box, if the element'stextattribute location, the report "elementnotvisibleexeception"Exception (the report exception is because the location path is written directlytextproperty, which should be from the nearest unique elementIDTo start, you can click on success. andSelecttype of drop-down box is not successful by two clicks, only withSelectorScc_selectormode). Change it.IDorXPATHPositioning method to locate (inputType drop-down box is not availableSelectorCss_selectorthe way to choose, you can only click the input box, and so on pop-up drop-down options, then click the dropdown option, butJava+seleniumYou can click on the input box first, then usetextthe properties of the location click the drop-down option)

Python + Selenium automation environment Frequently asked Questions summary

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.