Paulliev Posted March 8, 2021 Posted March 8, 2021 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.
Paulliev Posted March 8, 2021 Author Posted March 8, 2021 I found it, looks like it can be done with the following code: _WD_ElementAction($sSession, $input , 'clear')
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now