Selenimu usage notes

Source: Internet
Author: User

1. After recording the script from selenium ide1.8.1, convert it to the python2 (Remote Control) script. Pay attention to the Instance name space. If there are spaces, the Class Name of the converted Python script also has spaces, which may cause Syntax problems.

Solution: Replace space.

2. If the converted script contains Chinese characters, an Encoding Error is often reported, that is, non-ASCII character '\ xe7' in file.

Solution: Add #-*-coding: UTF-8-*-in the first line of the python File -*-

3. In the firefox11.0 browser, selenium ide1.8.1 does not support the dropdownlist of kendoui very well. Selenium uses the CSS selector to select the option by default, which is often unavailable.

Solution: we need to use XPath to select the target.

4. How does selenium ide1.8.1 send the Enter key or other special keys to the webpage?

Solution: commamd uses keypress and the value uses the ASCII code of the Return key.

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.