Java Code Examples for android.test.TouchUtils#dragQuarterScreenUp()

The following examples show how to use android.test.TouchUtils#dragQuarterScreenUp() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WeexUiTestCaseTCAHrefEvent.java    From incubator-weex-playground with Apache License 2.0 6 votes vote down vote up
/**
 *
 */
public void setUpToFindComponet(String target, InstrumentationTestCase test){
    int max = 60;
    int count = 0;
    while(mCaseListIndexView.size() == 0){

        if (count < max){
            TouchUtils.dragQuarterScreenUp(test, WXPageActivity.wxPageActivityInstance );
            mViewGroup = (ViewGroup) WXPageActivity.wxPageActivityInstance.findViewById(R.id.container);
            mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
            count ++;
        }
        else{
            break;
        }

    }
}
 
Example 2
Source File: TestFlow.java    From incubator-weex-playground with Apache License 2.0 6 votes vote down vote up
private void findChildCase(final WXTextView inputView ){
        // handle if the view is INVISIBLE then scrollToBottom
//        int maxStep = 10;
        int scrollCount = 0;
        if(inputView.getVisibility() == View.INVISIBLE){
            while(scrollCount <maxStep){
                TouchUtils.dragQuarterScreenUp(this, this.getActivity());
                sleep(1000);
                scrollCount ++;
            }
        }
//        int topCount = 10;
        if(inputView.getVisibility() == View.INVISIBLE){
            while(topCount>0 && (inputView.getVisibility() == View.INVISIBLE)){
                TouchUtils.dragQuarterScreenDown(this, this.getActivity());
                sleep(1000);
                topCount--;
            }
        }

    }
 
Example 3
Source File: WeexUiTestCaseTCAHrefStyle.java    From incubator-weex-playground with Apache License 2.0 6 votes vote down vote up
/**
 *
 */
public void setUpToFindComponet(String target, InstrumentationTestCase test){
    int max = 60;
    int count = 0;
    while(mCaseListIndexView.size() == 0){

        if (count < max){
            TouchUtils.dragQuarterScreenUp(test, WXPageActivity.wxPageActivityInstance );
            mViewGroup = (ViewGroup) WXPageActivity.wxPageActivityInstance.findViewById(R.id.container);
            mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
            count ++;
        }
        else{
            break;
        }

    }
}
 
Example 4
Source File: WeexUiTestCaseTCAHrefUpdate.java    From incubator-weex-playground with Apache License 2.0 6 votes vote down vote up
/**
 *
 */
public void setUpToFindComponet(String target, InstrumentationTestCase test){
    int max = 60;
    int count = 0;
    while(mCaseListIndexView.size() == 0){

        if (count < max){
            TouchUtils.dragQuarterScreenUp(test, WXPageActivity.wxPageActivityInstance );
            mViewGroup = (ViewGroup) WXPageActivity.wxPageActivityInstance.findViewById(R.id.container);
            mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
            count ++;
        }
        else{
            targetComponetNotFound = true;
        }

    }
}
 
Example 5
Source File: WeexUiTestCaseTcTextStyleRow.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 6
Source File: WeexUiTestCaseTcSlider.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 7
Source File: TestFlow.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        sleep(500);
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 8
Source File: WeexUiTestCaseTcInputPlaceholder.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 9
Source File: WeexUiTestCaseTcInputStyle.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 10
Source File: WeexUiTestCaseTcInputType.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 11
Source File: WeexUiTestCaseTcColorType.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 12
Source File: WeexUiTestCaseTcTextType.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 13
Source File: WeexUiTestCaseTcElementOpt.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 14
Source File: WeexUiTestCaseTcTextStyleColumn.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 15
Source File: WeexUiTestCaseTcTextStyleOwn.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 16
Source File: WeexUiTestCaseTcDowngradeAppVTrue.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 17
Source File: WeexUiTestCaseTcDowngradeOSVFalse.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 18
Source File: WeexUiTestCaseTcDowngradeAppVFalse.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 19
Source File: WeexUiTestCaseTcDowngradeWeexVFalse.java    From incubator-weex-playground with Apache License 2.0 5 votes vote down vote up
public void addAllTargetView(String target){
    int max = 6;
    int count =0 ;
    while (count < max){
        TouchUtils.dragQuarterScreenUp(this, this.getActivity());
        mViewGroup = (ViewGroup) waTestPageActivity.findViewById(R.id.container);
        mCaseListIndexView = ViewUtil.findViewWithText(mViewGroup, target);
        mCaseListIndexView.addAll(mCaseListIndexView);
        count ++;
    }
}
 
Example 20
Source File: ViewUtil.java    From incubator-weex-playground with Apache License 2.0 2 votes vote down vote up
public static void dragQuarterScreenUp(InstrumentationTestCase test, Activity activity) {

        TouchUtils.dragQuarterScreenUp(test, activity);
    }