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

Input With Onchange Event That Triggers A Postback, Fails When Using Selenlium IDE Type Command #1211

Open
RocktimeLtd opened this issue Feb 20, 2020 · 0 comments

Comments

@RocktimeLtd
Copy link

🐛 Bug Report

Using Type command is causing post-back and removing focus from textbox, if textbox already contains data.

.Net Textbox with autopostback=true (page is automatically submitted if the content of the textbox has changed and you are returned to the same page)

-->

To Reproduce

Detailed steps to reproduce the behavior:

Type command causes additional postback if textbox contains data.
await driver.findElement(By.css(.sid-fd2_Q_2)).then(element => {
return element.clear().then(() => {
return element.sendKeys(2);
});
});
Both the element.clear and the element.sendKeys remove focus from the textbox. This will cause a post-back if the content of the textbox has changed. If this post-back fires element for the sendKeys will no longer be valid (different page)

Expected behavior

The generated code should be allowing the element to be relocated in case of a post-back
await driver.findElement(By.css(.sid-fd2_Q_2)).then(element => {
return element.clear();
});
await driver.findElement(By.css(.sid-fd2_Q_2)).then(element => {
return element.sendKeys(2);
});

Test script or set of commands reproducing this issue

await driver.findElement(By.css(.sid-fd2_Q_2)).then(element => {
return element.clear().then(() => {
return element.sendKeys(2);
});
});

Environment

OS:
Browser:
Browser version:
Browser Driver version:
Language Bindings version:

@diemol diemol transferred this issue from SeleniumHQ/selenium Mar 10, 2021
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