Jump to content

Kyco999

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Kyco999

  1. #include "wd_core.au3" #include "wd_helper.au3" Local $sSession Local $sDesiredCapabilities SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://whoer.net/") MsgBox(0,0,0) _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": {"goog:chromeOptions": {"w3c": "true", "args": ["disable-web-security"], "proxy": {"proxyType":"manual","httpProxy":"3.83.95.178:8888","sslProxy":"3.83.95.178:8888","autodetect": "false"}}}}' EndFunc I use this code to change proxy but it doesn't working anything!! Can you teach me how to set proxy for chrome?
  2. I solved it. Thanks and sorry @Jos .....but I have new issue How can i get results from _WD_ExecuteScript? $string = _WD_ExecuteScript($sSession, "var content = document.getElementsByClassName('contentpagetop')[0].innerHTML;return content;") MsgBox(0,0,$string)
  3.   $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//click[@id='like_ajax']") _WD_ElementAction($sSession, $sElement, 'click') Help me! How can I click the like button like in the picture? I tried replacing id and class but still not working.
×
×
  • Create New...