android-uiautomator-server icon indicating copy to clipboard operation
android-uiautomator-server copied to clipboard

如果selector 同时传入checked 和checkable 参数, 会报错Checkable selector is already defined

Open linxi-1214 opened this issue 4 years ago • 0 comments

猜测原因:src/androidTest/java/com/github/uiautomator/stub/Selector.java: 157 ~ 166

    public BySelector toBySelector() {
        BySelector s = null;
        if ((getMask() & Selector.MASK_CHECKABLE) > 0 && android.os.Build.VERSION.SDK_INT >= 18)
            s = By.checkable(this.isCheckable());
        if ((getMask() & Selector.MASK_CHECKED) > 0) {
            if (s == null)
                s = By.checked(isChecked());
            else
                s = s.checkable(isChecked());   // 猜测是行的函数调用错了?应该是s.checked?
        }

linxi-1214 avatar Dec 29 '20 15:12 linxi-1214