Jump to content

Sopr

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

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

Sopr's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have tried that, but there are just 1 script there and a part of other. Example of getting data from enforcmenttracker was helpful a bit, but it still has a lot of gaps. Starting fromthe fact that enforcementtracker webpage does not open so a few example screenshots would be good. What about the syntax? For example what does $_WD_LOCATOR_ByXPath, mean and what is the data in the string after it?
  2. I am a complete newbie to autoit coding and do agree that IE is almost dead and none of our customer portals work in it, so I need to write some code compatible with chrome or Firefox. When truing to use WD I hit a wall, that there are no materials for beginners, wiki is good start. Can you please add some easy beginner type scripts as example? So far there is the wd_demo, but that covers just tasks, of opening a page and entering data in to active input object. How do I identify and click on a web button or a link? Can you please add an example with syntax example and how to use it? At the moment wiki has the Function name, description and some comments, but no actual syntax examples and explanations on what each part on the function is used for.
  3. Is there any debuggers that work with the WD Driver? I tried using the Graphical Debugger from here http://www.thefoolonthehill.net/drupal/AutoIt Debugger, but when I try to run it step by step, it just jumps between WinHttps and wd_core in a perpetual loop, after 20 minutes of this I stopped it. Is there any good tutorials or videos on how to click on buttons, links and banners on the webpage for beginners? Wiki is not too descriptive and does not have syntax or examples.
  4. Hello I am a bit new to AutoIT coding and need some help on creating an application that would log in to our customer portal and upload a data table with order status. I am having trouble with auto login part and upload button push. I can get the IE window to open with no issues, the user and password is filled, but then i can not get the submit button to click. I tried getting it by Name or Id, I tried Send ("{ENTER}") command. But I still can not make the button click. I do not wnat to use the Mouse click option , because the window is different sizes on different computers this is intended for. #include<IE.au3> Call ("SignIn") Func SignIn() Global $oIE=_IECreate("https://Cutomer Portal") Local $username=_IEGetObjByName($oIE,"j_username") Local $password=_IEGetObjByName($oIE,"j_password") Local $button=_IEFrameGetObjByName($oIE, "j_submit") _IEFormElementSetValue($username,"Myusername") _IEFormElementSetValue($password,"Mypassword") _IEAction($button,"click") EndFunc I have tried using Chrome and WD driver for it as well. Unfortunately the Graphical Debugger does not seems to like the driver and every time I try to run it it gets stuck in some loop constantly jumping between WinHTTP and wd_core files. When I tried running the following code from wd_demo modified to my page. I get the same picture. User and password are entered correctly, but the submit button is not clicked. I suspect it is because there is no command to do that, but the Chrome driver does not have help file that shows the commands and their syntax. Wikipage is somewhat helpful it has the comments with options, but no clear syntax. I made a new function ChromeActionclickbyId, but I may have screwed up somewhere and it does not work as it should. #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://Customer Portal") <snip> _ChromeActionclickbyId($sSession,'j_submit') _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, "args":[' & """start-maximized""," & " ""disable-infobars""" & "" & '] }}}}' EndFunc ;==>SetupChrome Func _ChromeSetInputValueById($sSession,$Id,$Value) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']") _WD_ElementAction($sSession,$sButton,'value', $Value) EndFunc Func _ChromeActionclickbyId($sSession,$Id) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']") _WD_ElementAction($sSession,$sButton,'click') EndFunc
×
×
  • Create New...