-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
What happened?
Browser: Version 130.0.6723.59 (Official Build) (arm64)
Selenium Version:
org.seleniumhq.selenium:selenium-devtools-v86:4.8.2
Details:
I wrote code to clear the entered text and then input new text, but every time, the cleared text would reappear along with the new text, resulting in both being concatenated
Here is code:
public void sendKeysToWebelement(By by, String string) {
Wrapperdriver.findElement(by).clear();
Wrapperdriver.findElement(by).sendKeys(string);
}
Sharing DOM structure of user field
<input aria-invalid="false" id=":r1v:" class="MuiInputBase-input MuiOutlinedInput-input css-1x5jdmq" type="username" value="">
Note:
This website has another username field on a different Page where the above-shared code works perfectly.
Sharing DOM structure of this Username:
<input autocomplete="off" type="password" class="MuiInputBase-input MuiInput-input MuiInputBase-inputAdornedStart css-mnn31" name="password">
How can we reproduce the issue?
public void sendKeysToWebelement(By by, String string) {
Wrapperdriver.findElement(by).clear();
Wrapperdriver.findElement(by).sendKeys(string);
}
### Relevant log output
```shell
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2024-10-17T09:36:29.799187Z</date>
<millis>1729157789799</millis>
<nanos>187000</nanos>
<sequence>2</sequence>
<logger>com.abc.Tests.SAT.SAT_SidebarMenusTestCases</logger>
<level>WARNING</level>
<class>com.abc.Tests.SAT.SAT_SidebarMenusTestCases</class>
<method>HAR_TC_2046_Test</method>
<thread>1</thread>
<message>this is a warning</message>
</record>
<record>
<date>2024-10-17T09:36:29.801918Z</date>
<millis>1729157789801</millis>
<nanos>918000</nanos>
<sequence>3</sequence>
<logger>com.abc.Tests.SAT.SAT_SidebarMenusTestCases</logger>
<level>INFO</level>
<class>com.abc.Tests.SAT.SAT_SidebarMenusTestCases</class>
<method>HAR_TC_2046_Test</method>
<thread>1</thread>
<message>this is useful information</message>
</record>
<record>
<date>2024-10-17T09:36:29.802698Z</date>
<millis>1729157789802</millis>
<nanos>698000</nanos>
<sequence>4</sequence>
<logger>com.Abc.Tests.SAT.SAT_SidebarMenusTestCases</logger>
<level>FINE</level>
<class>com.abc.Tests.SAT.SAT_SidebarMenusTestCases</class>
<method>HAR_TC_2046_Test</method>
<thread>1</thread>
<message>this is detailed debug information</message>
</record>
Operating System
MacOS sonoma
Selenium version
4.8.2
What are the browser(s) and version(s) where you see this issue?
chrome 130.0.6723.59
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 130.0.6723.58
Are you using Selenium Grid?
No response