Appium's various

Source: Internet
Author: User

This is a few days to get killed and mutilated, always have to record the process.

1. Build Appium test environment and bring your own ladder

github.com/getlantern/forum/issues/4775

2. Import testng for use case management

The focus is the use of various annotations, including Beforesuite, Class,method,test,parameter, and so on, there is no use of dataprovider and testng monitoring, this later understand.

3. Import log4j

?????? It's not going to work, but it's already used,,, and the logs are super-big? It won't work, fall. It's a point of knowledge, slowly completing.

4. Import Maven

git clone two projects, but is the MAVEN project, before the use of the Web, the IDE is IDEAJ, now replaced by Eclipse, a little crazy, and then import the project, has been an error. The hair is all gone.

The solution is:

Http://www.yiibai.com/maven/maven_creating_project.html#article-start

Follow the above to create a project in cmd, inside the cmd will be detailed hints settings.xml where the wrong, than the direct build of a bunch of hints to be more reliable.

I just settings.xml didn't write well, cause the project has been a problem

5.appium Some of the problems encountered in the middle and solutions

1. Switch WebView, this has not been able to cut the past, later to find colleagues packaged a can switch WebView version, but this has not been tried

2. Input method problem, cause Sendkey character always have problem, here I downloaded a bing input method, set the keyboard parameter:

Capabilities.setcapability ("Unicodekeyboard", true);

3. As I put the test class, built several, in the Testng.xml execution, each class will have to reinstall the app, in the Appium checked the no reset also useless, so the code set a bit:

Capabilities.setcapability ("NoReset", true);

4.EditText can not directly clear,sendkeys, will always prompt nosuchelement, the solution is as follows:

public static void Cleartext (androiddriver<androidelement> driver,string text) throws Interruptedexception, IOException {

Driver.presskeycode (123);
for (int i=0;i<text.length (); i++) {
Driver.presskeycode (67);
}
}

5.appium does not support 7.0, and then to blind a few changes to change the configuration of the day, day, day, day, day, day, day, day, date and day.

Appium of various

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.