Highlighted
leanft_boon Contributor.
Contributor.
101 views

Unable to use sendKeys in ComboBox

I'm having trouble entering text in a combo box. I don't see the text being entered but I can see the button being clicked. I am not getting any error. And this used to work before. Thoughts?

 

browser.describe(Dialog.class, new DialogDescription.Builder()
.ownedWindow(true)
.childWindow(false)
.text("Choose File to Upload")
.nativeClass("#32770").build())
.describe(ComboBox.class, new ComboBoxDescription.Builder()
.attachedText("File &name:")
.nativeClass("ComboBox").build())
.sendKeys("C:\\Users\\user1\\Desktop\\Test.docx");

browser.describe(Dialog.class, new DialogDescription.Builder()
.ownedWindow(true)
.childWindow(false)
.text("Choose File to Upload")
.nativeClass("#32770").build())
.describe(UiObject.class, new UiObjectDescription.Builder()
.windowClassRegExp("Button")
.windowId(1).build())
.click();

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Unable to use sendKeys in ComboBox

Did you try adding a click before sendkeys?

0 Likes
leanft_boon Contributor.
Contributor.

Re: Unable to use sendKeys in ComboBox

Yeah, I did try that. Still not keying the text though.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.