Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no such element #8

Open
CHIYOONMI opened this issue Feb 17, 2020 · 2 comments
Open

no such element #8

CHIYOONMI opened this issue Feb 17, 2020 · 2 comments
Assignees

Comments

@CHIYOONMI
Copy link
Owner

CHIYOONMI commented Feb 17, 2020

        while (1==1) {
            CallUtils.androidBackKey(driver);
            CommonUtils.sleep(1000);

            if (CallUtils.isDisplayedCallStatus(driver)) {
                CommonUtils.sleep(50000);
                CallUtils.ClickEndButton(driver);
                break;
            }
            else {
                CallUtils.Resumepoint(driver);
                CommonUtils.sleep(5000);
            }
        }

if 조건이 no such element일 때,
else체크하지 않음.
해결방법.. 을 찾아 봅시다ㅠ

@CHIYOONMI
Copy link
Owner Author

        while (1==1) {
            CallUtils.androidBackKey(driver);
            CommonUtils.sleep(1000);

            try {
                if (CallUtils.isDisplayedCallStatus(driver)); {
                    CommonUtils.sleep(5000);
                    CallUtils.ClickEndButton(driver);
                    break;
                }
            } catch (NoSuchElementException e) {
                CallUtils.Resumepoint(driver);
                CommonUtils.sleep(5000);
            }
        }

일단 해결..
근데 try / catch쓰는게 맞음??

@CHIYOONMI CHIYOONMI self-assigned this Feb 18, 2020
@CHIYOONMI
Copy link
Owner Author

if (switch1.getAttribute (“checked”). equals (“true”)) {
System.out.println (“enable”);
} else {switch1.click ();
}

내일 이거 해보기
getAttribute().equals()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant