Jump to content

Search the Community

Showing results for tags 'webdriver udf'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. I had some issue with attacing to existing chrome. But it was very wired. First of all log: some findings: https://issues.chromium.org/issues/42323720 As you know I know about this: Finally I was able to attach to runing Chrome instances and this usually works fine. Today my situation was like this: I was working on automating a certain portal, to which a client logged in. This portal is something like an email box. To make sure that the page would not log me out, I refreshed the page every few minutes or clicked on some of its elements (inbox, trash, sent, etc.). I wrote 20 lines of code and did tests by connecting to an existing session. another 20 lines.... another 20 lines.... another 20 lines.... After about 2 hours of such work, the error that I mention above appeared. The log comes from the connection creation stage, i.e. the part of the code that I did not change. Simply refreshing the browser F5 did not help - unfortunately I did not check CTRL+F5 (or CTRL+SHIFT+R) that should perform a "hard refresh". Interestingly, the only solution that helped was manually navigating to another page within the same browser tab, and then navigating again to the automated portal, which fortunately did not log me out. Question: Do you have any idea why manually navigating to another portal and navigating back to the desired portal solves this problem? btw. Today I did reasarch on Au3Forum and I saw other related question - quite fresh - I think they may be related to my issue:
  2. Running AutoIt v3.3.16.1. au3WebDriver v1.3.1 downloaded from https://github.com/Danp2/au3WebDriver about a week or two ago. Before posting this question, I went back there and noticed that three files have been updated (wd_core.au3, wd_demo.au3, wd_helper.au3). I have updated those three files, but the problem persists. Using Firefox with geckodriver. I am trying to click on a search button on a specific web page. By default, this forces a new window to open with the content. However, I want the content to open in a new tab, not in a new window. If I hold down CONTROL key and then mouse click on the button, then it opens in a tab. So I am trying to reproduce this in au3WebDriver code with _WD_ElementActionEx() using command "MODIFIERCLICK". I tried a number of different things but I kept getting Invalid argument. Here is an example: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "modifierclick", Default, Default, Default, Default, "\ue009") And here is the error message: _WD_ElementActionEx ==> Invalid argument [5] : Parameters:    Element=ab689017-29ea-4441-943e-621e3bb7d7e5    Command=modifierclick    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=\ue009    ScrollView=Default For awhile I was not sure if I was specifying the WebDriver key for CONTROL correctly. So then I went back and decided to use command "click" just to make sure I had everything else specified correctly. And that opens a new window as expected without errors. _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "click", Default, Default, Default, Default, Default) _WD_ElementActionEx ==> Success [0] : Parameters:    Element=ce6b46bf-431c-4de9-8602-f199a27881f1    Command=click    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=Default    ScrollView=Default I started thinking maybe you just cannot send CONTROL to the button using command "modifierclick". So then I went and tried to use _WD_ElementActionEx() with command "modifierclick" using only defaults (according to the UDF, Default for $sModifier is "\uE008" (shift key). SHIFT is not what I wanted, but I wanted to verify it would at least complete without an error, but it did not. Here is what I tried: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "modifierclick", Default, Default, Default, Default, Default) That gives a similar error message. _WD_ElementActionEx ==> Invalid argument [5] : Parameters:    Element=9913ac04-2eed-4f20-871e-17efb09ca417    Command=modifierclick    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=Default    ScrollView=Default Anyone have any idea what is going on? Thanks.
  3. In the old FF.au3 library, there were two functions for getting and setting values of about:config preferences for Firefox. I was wondering if there are any equivalents for WebDriver au3, @Danp2 Func _FFPrefGet($sName) Local Const $sFuncName = "_FFPrefGet" Local $sCommand Local $iType = _FFCmd('FFau3.obj=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); FFau3.obj.getPrefType("' & $sName & '");') If @error Then SetError(__FFError($sFuncName, $_FF_ERROR_InvalidValue, $sName)) Return 0 EndIf Switch $iType Case 0 SetError(__FFError($sFuncName, $_FF_ERROR_NoMatch, "$sName: " & $sName)) Return 0 Case 32 ; PREF_STRING $sCommand = "getCharPref" Case 64 ; PREF_INT $sCommand = "getIntPref" Case 128 ; PREF_BOOL $sCommand = "getBoolPref" EndSwitch $sCommand = StringFormat('FFau3.obj.%s("%s");', $sCommand, $sName) Return _FFCmd($sCommand) EndFunc ;==>_FFPrefGet Func _FFPrefSet($sName, $vValue) Local Const $sFuncName = "_FFPrefSet" Local $sCommand Local $iType = _FFCmd('FFau3.obj=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);FFau3.obj.getPrefType("' & $sName & '");') If @error Then SetError(__FFError($sFuncName, $_FF_ERROR_InvalidValue, $sName)) Return 0 EndIf Local $vOldValue = _FFPrefGet($sName) Switch $iType Case 0 SetError(__FFError($sFuncName, $_FF_ERROR_NoMatch, "$sName: " & $sName)) Return 0 Case 32 ; PREF_STRING If Not IsString($vValue) Then SetError(__FFError($sFuncName, $_FF_ERROR_InvalidDataType, "(string) $vValue: " & $vValue)) Return 0 EndIf $sCommand = StringFormat('FFau3.obj.%s("%s","%s");', "setCharPref", $sName, $vValue) Case 64 ; PREF_INT If Not IsInt($vValue) Then SetError(__FFError($sFuncName, $_FF_ERROR_InvalidDataType, "(int) $vValue: " & $vValue)) Return 0 EndIf $sCommand = StringFormat('FFau3.obj.%s("%s",%s);', "setIntPref", $sName, $vValue) Case 128 ; PREF_BOOL If Not IsBool($vValue) Then SetError(__FFError($sFuncName, $_FF_ERROR_InvalidDataType, "(bool) $vValue: " & $vValue)) Return 0 EndIf $sCommand = StringFormat('FFau3.obj.%s("%s",%s);', "setBoolPref", $sName, __FFB2S($vValue)) EndSwitch _FFCmd($sCommand) If Not @error Then Local $vRetVal = _FFPrefGet($sName) If Not @error And $vRetVal = $vValue Then SetExtended($vOldValue) Return 1 Else SetError(__FFError($sFuncName, $_FF_ERROR_RetValue, "$vValue <> " & $vRetVal)) Return 0 EndIf EndIf Return 0 EndFunc ;==>_FFPrefSet
  4. Hi, With Internet Explorer, if I wanted to restore windows, I used : Local $hWnd = _IEPropertyGet($oIE, 'hwnd') WinSetState($hWnd, '', @SW_RESTORE) Is it possible to do same thing with _WD fonction ?
×
×
  • Create New...