Jump to content

Can't change TextBox in Google Chrome

Recommended Posts

Hello to Everyone!

I need to change only one TextBox on page in Chrome, but can't do that.

#include "UIAutomate.au3"

Global $ChromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"
Run($ChromePath & " --force-renderer-accessibility")

$hWnd = WinWait(" - Google Chrome", "", 5)

$oParent = _UIA_GetElementFromHandle($hWnd)

$oElement = _UIA_GetControlTypeElement($oParent, "UIA_EditControlTypeId", "Адресная строка и строка поиска")



Send("^v" & "{enter}")

_UIA_WaitControlTypeElement($oParent, "UIA_TextControlTypeId", "Предупреждение", Default, False)

$oElement = _UIA_GetControlTypeElement($oParent, "UIA_EditControlTypeId", "")

_UIA_ElementTextSetValue($oElement, "5000.00")


Page is opening, but value doesn't change. The TextBox is already under the focus. I tried _UIA_GetElementFromFocus but it doesn't work as well.

Please help.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...