Jump to content

Muddyblack

Members
  • Posts

    5
  • Joined

  • Last visited

Muddyblack's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. oh okay it was just to create a shortcut ^^ okay i will let my hands of it
  2. well I dont know if it will help ^^ https://www.hiddenempire.de/jetztspielen
  3. Well i think i did use it wrong it does nothing ^^ I am sry I have no experiences Func ZuKartenAnsicht() _WD_ExecuteScript($sSession, "jQuery('.heMenuIconsSmall_map').click()") sleep(2000) $Systeminput = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='galaxy-load-id']") $sAction = '{"actions":[{"type": "key", "id": "galaxy-load-id", "actions": [{"type": "keyDown", "value": "\uE003"}, {"type": "keyUp", "value": "\uE003"}]}]}' _WD_Action($sSession,"actions", $sAction) _WD_ElementAction($sSession, $Systeminput, 'value', $i ) sleep(100) _WD_ExecuteScript($sSession, "jQuery('#galaxy-load-outer').click()") EndFunc Here this is the input html:
  4. And OneSolution mentioned 2019 that he was able to use a code that was kind of this: $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//*[contains(text(),'Save')]") _WD_ElementAction($sSession, $sElement, 'click') But when i use it it does nothing. Do I have to include something more to use it ?
  5. Hey I am new to wd and I have the problem with changing an inout value. The Website does automatically preset a value. So if I use: _WD_ElementAction($sSession, $Systeminput, 'value', $i ) it just adds $i behind the existing value instead of replaxing it. So what I have tried is to use Send("Backspace") to delet text but it doesnt work so i tried it with _WD_ElementAction($sSession, $sElement, 'value', "\uE003") but here it just added "\uE003" as text into the next input the is right placed of the input i want to change . So This is what i have (shorten): #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "Website...") $logfile = ".\Logger.log" $logiconent = FileReadLine($logfile, 1) $i = $logiconent;zuletztgewesene StandardSystem HotKeySet("{NumPad2}", "DoSth") While 1 Sleep(50) WEnd Func DoSth() $Systeminput = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='input-id']") _WD_ElementAction($sSession, $Systeminput, 'value', $i ) sleep(100) _WD_ExecuteScript($sSession, "jQuery('#confirmbutton').click()") EndFunc _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"]}}}}' EndFunc ;==>SetupChrome Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc ;==>SetupGecko I hope you can help me out again summary: How to replace input value
×
×
  • Create New...