Jump to content

Recommended Posts

Posted

Hello guys,

I want to clear a input after it typed something, I can't find anything to clear the input with Webdriver udf. See the code below so you can see what I want to do.

_ChromeSetInputValueById($sSession,'id_corc_id', $organizationPart1)
Sleep(4000)
$iValue = _WD_ExecuteScript($sSession, "return document.getElementById('suggestions_corc_id').children.length;")
$iCountPart1 = StringRegExpReplace($iValue, "\D", "")
_ChromeSetInputValueById($sSession,'id_corc_id', "")


_ChromeSetInputValueById($sSession,'id_corc_id', $organizationPart2)
Sleep(4000)
$iValue = _WD_ExecuteScript($sSession, "return document.getElementById('suggestions_corc_id').children.length;")
$iCountPart2 = StringRegExpReplace($iValue, "\D", "")
_ChromeSetInputValueById($sSession,'id_corc_id', "")

_ChromeSetInputValueById($sSession,'id_corc_id', $organizationPart3)
Sleep(4000)
$iValue = _WD_ExecuteScript($sSession, "return document.getElementById('suggestions_corc_id').children.length;")
$iCountPart3 = StringRegExpReplace($iValue, "\D", "")
_ChromeSetInputValueById($sSession,'id_corc_id', "")

I want to search on organizationPart1, then I want to clear the input and go on to the next one. 

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...