Currently, I am facing an issue with 3 text boxes in a row that I am populating using JavaScript. The problem arises when I enter text into one field and then move to the second box to input text - the value from the first text box gets removed. Below is the code snippet we are utilizing for text input:
((JavascriptExecutor) webDriver).executeScript(
"arguments[0].setAttribute('value','"+inputText+"')",
element);