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

NullPointerException when stale element reference #307

Closed
cjayswal opened this issue Dec 4, 2019 · 0 comments
Closed

NullPointerException when stale element reference #307

cjayswal opened this issue Dec 4, 2019 · 0 comments
Milestone

Comments

@cjayswal
Copy link
Member

cjayswal commented Dec 4, 2019

QAF Version:2.x

Expected behavior

When StaleElementReferenceException thrown framework should internally handle and should not break the execution if element present with new id or throw exception for element not present .

Actual behavior

if element exist in case of stale reference, it throws NullPointerException where command returns value for example getText

Works fine in case of commands that doesn't return value for example: Click, Clear, Sendkeys

Is the issue reproducible on runner?

Issue reproducible with code:

QAFExtendedWebElement ele  = new QAFExtendedWebElement("locator");
ele.getText(); //should work
ele.setId("b421c72a-39b0-44d1-8d57-71b081e2eeee"); //mimic stale
ele.getText(); //java.lang.NullPointerException

@cjayswal cjayswal added this to the 3.0.0 milestone Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant