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

setValue doesn't work #68

Open
aaronseg opened this issue Jan 15, 2018 · 4 comments
Open

setValue doesn't work #68

aaronseg opened this issue Jan 15, 2018 · 4 comments

Comments

@aaronseg
Copy link

aaronseg commented Jan 15, 2018

It was possible to open the firefox browser, but not to set the value of the adress line.
My fault or is there a problem with the setValue()-function?

AutomationEditBox editBox = window.getEditBox("Suche oder Adresse eingeben");
TimeUnit.SECONDS.sleep(2);
editBox.setValue("Suchbegriff");
System.out.println("Name: " + editBox.getValue());
AutomationButton automationButton = window.getButton("In der Adressleiste eingegebene Adresse laden");
automationButton.click();

@mmarquee
Copy link
Owner

When I do this via the the MS Inspect tool (which makes the same calls via automation), I can get the control, but set value returns ERROR - NOT IMPLEMENTED. There might be a setting for Firefox and automation, I will try and find out.

@aaronseg
Copy link
Author

Okay, Thanks. :)
Does it work on any other Browser?

@autoasi
Copy link

autoasi commented Aug 7, 2018

Hi @mmarquee
I'm unable to setValue() on Windows10 machine. The following code fails on the second row:

AutomationEditBox txtUser = winLogin.getEditBox("logon_name");	
txtUser.setValue("yyy");

Error:
Exception in thread "main" mmarquee.automation.AutomationException: Error: 0x80020003
at mmarquee.automation.pattern.Value.setValue(Value.java:112)
at mmarquee.automation.controls.AutomationEditBox.setValue(AutomationEditBox.java:76)
at poc.TEST_UIAutomation.main(TEST_UIAutomation.java:38)

Any suggestions?

@ViolenceAesthetics
Copy link

ViolenceAesthetics commented Mar 5, 2019

@mmarquee
我无法在Windows10机器上设置VALal()。以下代码在第二行失败:

AutomationEditBox txtUser = winLogin.getEditBox("logon_name");	
txtUser.setValue("yyy");

错误:
线程“main”中的异常mmarquee.automation.AutomationException:错误:0x80020003
at mmarquee.automation.pattern.Value.setValue(Value.java:112)
at mmarquee.automation.controls.AutomationEditBox.setValue(AutomationEditBox.java:76 )
在poc.TEST_UIAutomation.main(TEST_UIAutomation.java:38)

有什么建议?

我也是这个问题,请问你解决了吗?如何解决的?我的方法如下:
public void testGetPlatformWindow() throws Exception {
AutomationWindow window = instance.getDesktopWindow("登录",3);
window.focus();
AutomationEditBox automationEditBox = window.getEditBox(0);
automationEditBox.getValue();
AutomationEditBox automationEditBox1 = window.getEditBox(1);
if (!automationEditBox1.isReadOnly()){
automationEditBox1.setValue("12345678");
}
}

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

4 participants