Jump to content

pempemHY

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pempemHY's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1.   Try this code! Then delete the line "_WD_Window($sSession, 'fullscreen')" and try it again . See the difference.
  2. Thank you, my problem was solved. Some elements at the bottom of the page (must use PageDown if you wan to see them) can't be interacted,.To solve this, i have set fullscreen chrome and it's OK.
  3. #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities Local $iIndex Local $sSession $_WD_DEBUG = $_WD_DEBUG_Info SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.youtube.com/") Sleep(500) _WD_Action($sSession, "actions", 'PageDown') ;ControlSend($handles, "", $controlID, '{PGDN}') Sleep(20000) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true }}}}' EndFunc i try this with Youtube, key wasn't sent. Should i use ControlSend? Can i get controlID and handle of my session with this UDF?
  4. Hi Dan, when i choose the $Command is 'action' in the function _WD_Action, can i control the page to scroll down? And how to do it?
  5. #include "wd_core.au3" #include "wd_helper.au3" Local Enum $eFireFox = 0, _ $eChrome Local $aDemoSuite[][2] = [["DemoTimeouts", False], ["DemoNavigation", False], ["DemoElements", False], ["DemoScript", False], ["DemoCookies", False], ["DemoAlerts", False],["DemoFrames", False], ["DemoActions", True]] Local Const $_TestType = $eFireFox Local $sDesiredCapabilities Local $iIndex Local $sSession $_WD_DEBUG = $_WD_DEBUG_Info SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_custom_radio") ConsoleWrite("Frames=" & _WD_GetFrameCount($sSession) & @CRLF) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//iframe[@id='iframeResult']") _WD_FrameEnter($sSession, $sElement) $text = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input") _ArrayDisplay($text) _WD_FrameLeave($sSession) Sleep(30000) _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true }}}}' EndFunc I have tried that example but i still don't know how to click that radio or reach to its ID . I am noob, can you tell clearlier?
  6. Here is my radio buttons example: My example radio buttons Here is my simple code: #include <wd_core.au3> #include <wd_helper.au3> Local $sDesiredCapabilities, $sSession Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":[' & """start-maximized""," & " ""disable-infobars""" & "" & '] }}}}' EndFunc ;==>SetupChrome SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_custom_radio") $radio_4 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//span[@class='checkmark']") _WD_ElementAction($sSession, $radio_4, 'click') _WD_Shutdown() Can you help me to choose the radio button "Four". I have tried several times. I am new to this UDF, html and css. Thank you <3
×
×
  • Create New...