Skip to content

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

Description

@linxi-1214

猜测原因: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?
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions