Jump to content

Search the Community

Showing results for tags 'firefox'.

  • 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

  1. Today I hit such kind of problem: I saw: https://stackoverflow.com/questions/77055938/error-during-registration-remoteerrorchrome-remote-content-shared-remoteerro and: https://github.com/mozilla/geckodriver/issues/2204 https://bugzilla.mozilla.org/show_bug.cgi?id=1925934 https://docs.testery.io/fixing-tests/fix-common-selenium-exceptions/fix-an-unhandledalertexception I update FireFox to 133Beta and now I have such results: Dialog text: Masz nowe wiadomości. W celu ich przeczytania naciśnij przycisk "Komunikator". Po przeczytaniu oznacz wiadomość jako przeczytaną! GOOGLE TRANSLATE: Dialog text: You have new messages. To read them, press the "Communicator" button. After reading, mark the message as read! My question is how to bypass this problem with AutoIt ? I mean how to catch up such dialog exist ?
  2. Introducing AutoFox, A Modern, Simple, No dependency, Noob friendly yet powerful Firefox UDF ! It controls the browser using the devtools , with JS commands ... REQUIREMENTS: Firefox v120 or later INSTALLATION: Copy AutoFox.au3 to "C:\Program Files (x86)\AutoIt3\Include" Use #include <AutoFox.au3> in your script LIST OF FUNCTIONS: Example Script: #include <AutoFox.au3> _AFPrepare() _AFLoadWait("https://qavalidation.com/demo-form/",50) ;load a url with 50 seconds load timeout _AFSetValue("#g4072-fullname","Autofox" ) _AFScroll(0,200);optional _AFSetValue("#g4072-email","Autofox@Email.com" ) _AFSetValue("#g4072-phonenumber","0015145451514" ) _AFScroll(0,200);optional _AFSetValue("#g4072-gender","NA" ) _AFClick("#g4072-yearsofexperience-4") _AFClick("#g4072-skills-Automation testing") _AFScroll(0,900);optional _AFSetValue("#contact-form-comment-g4072-otherdetails","Will submit after 2 sec delay ...." ) _AFExecute("document.getElementById('main').style.setProperty('background-color', 'green', 'important'); "); custom JS command Sleep(2000);optional _AFClick(".wp-block-button__link") _AFWait(10);wait 10 seconds for current page to finish loading _AFAction("print");optional DOWNLOAD: Latest Version - v0.1 (15/09/2024) AutoFox.au3 Note: This is my first UDF, i am open to all criticism
  3. 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.
  4. 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
  5. Internet Explorer is nearly dead, newer versions of Firefox can't any longer be automated using Stilgar's FF UDF. Hence more and more users (including me) need to look at automating Webbrowsers using WebDriver. That's why I have started to create a tutorial in the wiki. It should describe all necessary steps from intallation to usage. I'm still collecting ideas for the tutorial - that's where you come into play. What do you expect to see in such a tutorial? Which browsers should be covered (Firefox, Chrome and Edge are settled)? Any questions for the FAQ? Which (high level) coding examples do you expect (like "How to attach to a running browser instance") ... Like to see your comments ToDo-List: Add "Tools" section and add ChroPath plugin. Done. FAQ: "How to attach to a running browser instance". Done. Explain the difference between iuiautomation, iaccessible, autoit, webdriver. Done. The AutoIt FAQ 40 has been extended. Detailed description of each function. Done Example for "how to deal with downloading". Use function _WD_DownloadFile. Example for "how to deal with popups (alerts, print or save dialog). Use function_WD_AlertRespond to respond to a user prompt. Example for "how to deal with multiple tabs". Use functions _WD_NewTab (create a new tab), _WD_Window (close or switch to a tab) and _WD_Attach (attach to existing tab).
  6. I'm using Firefox however it shows up in all browsers. When you hover over a hyperlink and the cursor turns to a hand then in the lower left corner of the browser the actual web URL link pops up. How does one capture that text programmatically? I know in FF I can right click and "Copy Link" I'm wondering if there is another way.
  7. hey . is it possible send message to firefox extension and receive too? what is simplest way
  8. I have a simple code that takes file "C:\Temp\File1.txt" and pastes it in drop area of specific firefox location ( Note : The drag drop works manually meaning firefox window supports drag and drop) . The return value is true with no error indicating that operation successful. The results are not getting updated in firefox window even after exe execution completion and sleep time 20secs. Attached my code snippet and _FileDragDrop.au3 + text file it works #include "_FileDragDrop.au3" Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client $File1 = "E:\AutoIt\DragDropFile\File1.txt" $File2 = "E:\AutoIt\DragDropFile\File2.txt" If ProcessExists("Firefox.exe") Then $hWnd = WinGetHandle("Mozilla Firefox") ; My FF tab title substring WinActivate($hWnd) Else MsgBox(64,"Error","No Firefox window found",10) EndIf $hNPPlus=WinGetHandle("[CLASS:Notepad++]") WinActivate($hNPPlus) $iRet = _FileDragDrop($hNPPlus, $File1, 75, 274) ConsoleWrite("Return: "&$iRet&" @error="&@error&", @extended="&@extended&@CRLF) Sleep(20000) ;~ Above code to add in Notepad++ works fine ;~ Cordinate from drop file 1 - 75, 274 $iRet = _FileDragDrop($hWnd, $File1, 75, 274,'|',False) ConsoleWrite("Return: "&$iRet&" @error="&@error&", @extended="&@extended&@CRLF) Sleep(20000) ;~ Above code to add file in firefox with title Mozilla firefox DOES NOT work Exit Repose from code --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Return: True @error=0, @extended=0 Return: True @error=0, @extended=0 _FileDragDrop.au3 File1.txt
  9. wd_capabilities.au3 UDF was changed/modified/refactored .... and commited/merged (02-12-2021) to https://github.com/Danp2/WebDriverWARNING: Before you start using this UDF be sure you download the recent version from: https://github.com/Danp2/WebDriver ================================================================================================== Recently I start wd_capabilities.au3 project on my side. I think this is time to share to AutoIt community. Check attached UDF: wd_capabilities.au3 Here is a scratch example showing how to use them: #include "wd_helper.au3" #include "wd_capabilities.au3" _Example() Func _Example() ........ ........ ........ _WD_Capabilities_Build_Arguments(Null) ; CLEANUP ARGS _WD_Capabilities_Build_Arguments('--headless') _WD_Capabilities_Build_Arguments('start-maximized') _WD_Capabilities_Build_Arguments('disable-infobars') _WD_Capabilities_Build_Arguments('user-data-dir', 'C:\Users\' & @UserName & '\AppData\Local\Google\Chrome\User Data\Default') Local $s_WD_Capabilities_Arguments = _WD_Capabilities_Build_Arguments(Default) ; GET ARGS _WD_Capabilities_Build_Preferences(Null) ; CLEANUP PREFS If $s_Download_dir Then _WD_Capabilities_Build_Preferences('download.default_directory', $s_Download_dir) Local $s_WD_Capabilities_Preferences = _WD_Capabilities_Build_Preferences(Default) ; GET PREFS Local $s_Desired_Capabilities = _WD_Capabilities_Build_JSON('chrome', $s_WD_Capabilities_Arguments, $s_WD_Capabilities_Preferences) Local $WD_SESSION = _WD_CreateSession($s_Desired_Capabilities) ........ ........ ........ EndFunc I plan to publish the code on GitHub. In the indefinite future, when the project becomes more functional, if @Danp2 accepts it, I hope it may be included in the main WebDriver UDF. I am waiting for yours feedback and help in the further development of this project. REMARK 1: As so far this UDF only supports GoogleChrome. Adding support for other browsers shouldn't be difficult, I just didn't need to. REMARK 2: For now, this project is working but still as a early BETA, so please do not discuss, ask questions, or post examples or snippets of code that pertain to any function of this UDF in other part of this forum, until it is found acceptable. Simply: discusion and tests only here in this topic. Regards, @mLipok
  10. So I was trying to write a function that can find a button (or any other XPath Element) and scroll the page + move the mouse to the location of the button. My logic for this was: 1. get position of button using _FFGetPosition 2. get inner dimensions of browser window and total dimensions of page 3. divide total dimensions by inner dimensions to get number of page down operations 4. use Mod() to get remaining pixels offset 5. MouseMove() and add requisite offsets for Titlebar etc (what the +5 and +54 is for in the last line) Example Code: _FFConnect($LocalHost, $BrowserPort, $TimeOut) Local $Button = _FFXPath(".//*[@id='thisbutton']") Local $ButtonPosition = _FFGetPosition($Button) Local $ElementWidth = $ButtonPosition[0] Local $ElementHeight = $ButtonPosition[1] Local $InnerWidth = _FFCmd("window.content.innerWidth") Local $InnerHeight = _FFCmd("window.content.innerHeight") Local $PageWidth = _FFCmd(".body.offsetWidth") Local $PageHeight = _FFCmd(".body.offsetHeight") Local $PGDNNo = Int($ElementHeight/$InnerHeight) Local $PGDNMod = Mod($ElementHeight, $InnerHeight) ; MsgBox(0,"","$ElementX: " & $ElementWidth & @CRLF & "$ElementY: " & $ElementHeight) ; MsgBox(0,"","$InnerWidth: " & $InnerWidth & @CRLF & "$InnerHeight: " & $InnerHeight) ; MsgBox(0,"","$PageWidth: " & $PageWidth & @CRLF & "$PageHeight: " & $PageHeight) ; MsgBox(0,"",$PGDNNo) ; MsgBox(0,"",$PGDNMod) Local $iter = 1 While $iter <= $PGDNNo WinActivate($BrowserWindowClass,"") _FFCmd("window.content.scrollByPages(1)") $iter += 1 WEnd MouseMove($ElementWidth + 5, $PGDNMod + 54) This isn't working. In some cases, it's not doing the page down operation the number of times needed, or not accurately pinpointing the location. I think there may be something wrong with the logic I'm using. What am I doing wrong? Thanks.
  11. This is for those pages that seem to load when you use _FFOpenURL(), but they have a text saying "please wait while we load your page..." but according to _FFOpenURL() the page has loaded. An example seen in popular sites is the Cloudflare page saying "Checking your browser before...". It's the opposite of pausing a script until an element is visible on a page. It takes Elements in the form of id, xpath or text search. Global $BrowserPort = 4242 Global $TimeOut = 60000 Global $LocalHost = "127.0.0.1" Func _FFWaitWhileElement($thiselement, $elementtype = "xpath", $timeoutms = 60000) _FFConnect($LocalHost, $BrowserPort, $TimeOut) Local $Element Local $ElementFound = 1 Local $TimeoutCountdown = 0 While $ElementFound <> 0 And $TimeoutCountdown < $timeoutms If $elementtype = "xpath" Then $Element = _FFXPath($thiselement) EndIf If $elementtype = "id" Then Local $ConstructXPath = ".//*[@id='" & $thiselement & "']" $Element = _FFXPath($ConstructXPath) EndIf ; MsgBox(0, "", $Element) Local $ElementXPathTextContent = _FFCmd("FFau3.xpath.textContent") ; MsgBox(0, "", $ElementXPathTextContent) Local $ElementXPathInnerHTML = _FFCmd("FFau3.xpath.innerHTML") ; MsgBox(0, "", $ElementXPathInnerHTML) If $ElementXPathTextContent = "_FFCmd_Err" Or $ElementXPathInnerHTML = "_FFCmd_Err" Then $ElementFound = 0 Else $ElementFound = 1 EndIf If $elementtype = "text" Then $ElementFound = _FFSearch($thiselement) ; MsgBox(0, "", $ElementFound) EndIf $TimeoutCountdown += 1000 _FFDisConnect() _FFConnect($LocalHost, $BrowserPort, $TimeOut) WEnd Return $ElementFound EndFunc _FFConnect($LocalHost, $BrowserPort, $TimeOut) _FFOpenURL("https://www.site.com/page", True) _FFWaitForElement("Please Wait...","text", 60000) MsgBox(0,"","Page finished loading") It's pretty simple, hope it helps some of you who are working with FF.au3 :)
  12. Hello forum, I have the problem that I can not use Firefox in combination with WebDriver when using AutoIt on some websites. Of course it does not work with the very website I need it to work with. As soon as I want to open the desired website, I get the little robot icon which tells me that the "browser is under remote control" and the website stays blank. I CAN open the website (www.ebay-kleinanzeigen.de) but I get blocked when I want to go to my account, to be precise. I am using AutoIt 3.3.14.5 I have checked my FireFox version. It is up to date. Also the special browser drivers like gecko etrc. are up to date too and everything works fine with the WebDriver demo. It seems that another user also had the same problem, but the thread has already been closed and the users solution (setting security lower did not work for me). I mean I can only choose between "standard", "strict" and "customized". On "customized I unchecked everything but it still would not change anything. I also have checked Google Chrome and MS Edge. Same result. I tried swiching profiles (only with FireFox). Same result. I tried to acess a previously opened FireFox session where I manually logged in by using this code snippet: _WD_Option('Driver', 'C:\Path\to\the\executable\geckodriver.exe') _WD_Option('DriverParams', '--log trace --connect-existing  --marionette-port 2828') _WD_Option('Port', 4444) Obviously I adjusted the path of the geckodriver.exe but it did not work at all on my computer. So far my code is really basically nothing but I can not even start to code. I myself am not a real coder and I know only the very basics like loops, conditions and variables. ---------------------------------------- ; Script Start #include <Array.au3> #include <AutoItConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <File.au3> #include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <StaticConstants.au3> #include "wd_core.au3" #include "wd_helper.au3" #include <WindowsConstants.au3> Local $sDesiredCapabilities, $sSession, $sElement SetupGecko() $_WD_DEBUG = $_WD_DEBUG_None _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.ebay-kleinanzeigen.de/m-meine-anzeigen.html?sort=CREATION_DATE_ASC&keyword=winter") Exit Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace --marionette-port 2828') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"capabilities":{"alwaysMatch": {"moz:firefoxOptions": {"args": ["-profile", "' & "C:/Users/myaccount/AppData/Roaming/Mozilla/Firefox/Profiles/0123456.default-release" & '"],"log": {"level": "trace"}}}}}' EndFunc ;==>SetupGecko 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 SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\msedge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & StringReplace(@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc ;==>SetupEdge -------------------------------------- I left the three setup functions in, because I do not care what browser I use as long as I can start coding. Also, please understand that I am not trying to be lazy here. I do not want someone to code for me. Maybe the problem is very basic, but I just do not know how to eliminate that restriction. Is it something I need to uncheck in the browser settings or is it more complicated? If you need more information, I will be happy to provide those. If somebody has an idea or a solution, I would very much appreciate it. Edit: I am not bothered by the robot icon itself. I do not care about it. If I try to acess my regular ebay account: "https://mesg.ebay.de/mesgweb/ViewMessages/0" it works like a charm despite the notification that the browser is remotely controlled. My problem is, that the first website does not load for some reason ONLY when the browser is remote controlled.
  13. hello please i need help i need to open link in default browser only one windows without duplicate if i try to open the same link thanks
  14. Hi all, I´m trying to use the command "WD_LoadWait" because I want to pause the script until the web page fully loads in Firefox but I don´t know how to use it. Here´s the full help ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WD_LoadWait ; Description ...: Wait for a browser page load to complete before returning ; Syntax ........: _WD_LoadWait($sSession[, $iDelay = 0[, $iTimeout = -1[, $sElement = '']]]) ; Parameters ....: $sSession - Session ID from _WDCreateSession ; $iDelay - [optional] Milliseconds to wait before checking status ; $iTimeout - [optional] Period of time to wait before exiting function ; $sElement - [optional] Element ID to confirm DOM invalidation ; Return values .: Success - 1 ; Failure - 0 and sets the @error flag to non-zero ; Author ........: Dan Pollak ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _WD_LoadWait($sSession, $iDelay = Default, $iTimeout = Default, $sElement = Default) Local Const $sFuncName = "_WD_LoadWait" Local $iErr, $sResponse, $oJSON, $sReadyState If $iDelay = Default Then $iDelay = 0 If $iTimeout = Default Then $iTimeout = $_WD_DefaultTimeout If $sElement = Default Then $sElement = "" If $iDelay Then Sleep($iDelay) Local $hLoadWaitTimer = TimerInit() While True If $sElement <> '' Then _WD_ElementAction($sSession, $sElement, 'name') If $_WD_HTTPRESULT = $HTTP_STATUS_NOT_FOUND Then $sElement = '' Else $sResponse = _WD_ExecuteScript($sSession, 'return document.readyState', '') $iErr = @error If $iErr Then ExitLoop EndIf $oJSON = Json_Decode($sResponse) $sReadyState = Json_Get($oJSON, "[value]") If $sReadyState = 'complete' Then ExitLoop EndIf If (TimerDiff($hLoadWaitTimer) > $iTimeout) Then $iErr = $_WD_ERROR_Timeout ExitLoop EndIf Sleep(100) WEnd If $iErr Then Return SetError(__WD_Error($sFuncName, $iErr, ""), 0, 0) EndIf Return SetError($_WD_ERROR_Success, 0, 1) EndFunc Any sugestions or examples?
  15. Hi everyone. I want to ask about this : I want it runs from 1 to 100 and It opens 10 firefox profiles then access youtube. After I close a firefox window, the loop runs and wait for another window close until loop ends I have a loop like this. Func launch() Local $from = Int(GUICtrlRead($input1)) Local $to = Int(GUICtrlRead($input2)) If $to <> "" Then While $from <= $to Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") $to=$to+1 WEnd Else Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") EndIf EndFunc Is there any solution? Thank you!
  16. my FF.au3 does get included but my script does not open firefox. here is my code so far: #include <FF.au3> _FFStart("https://www.google.com", Default, 0) I am using firefox portable version 52.0 Any and all help would be greatly appreciated. The code runs but nothing happens. I think the FF.au3 cannot find or connect to the firefox portable.
  17. All, I have decided to release my code for the automated clean install, set up and configuration of Mozilla Firefox with a Mozilla.cfg file included in my example as well. I seen an older version of this and decided to post mine on here. This is Windows 10 friendly. The whole process once compiled executes in about 15 seconds on my machine from start to finish as it is extremely fast. If you want to include your own Mozilla.cfg into the mix simply place Your Mozilla.cfg file in the same directory as the exe when it is run. If you do not wish to embed the Mozilla.cfg file into the script as a back up in case you forget you need to remove that line of code to embed it. I hope this helps some people esp those wanting to understand how to use a cfg file to set default settings for all users without having to do it by putting all those files and folders in the defaultapp data folders. #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Clear-App-firefox.ico #AutoIt3Wrapper_Outfile=FirefoxUpdater(x64Stable)_x.exe #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment=Preformes a clean install of Firefox 64bit Stable version. Auto downloads latest version. #AutoIt3Wrapper_Res_Description=Updates to the Latest 64bit Stable #AutoIt3Wrapper_Res_Fileversion=2.5.0.0 #AutoIt3Wrapper_Res_ProductVersion=2.5.0.0 #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <InetConstants.au3> #include <EventLog.au3> #include <Inet.au3> #include <File.au3> #include <array.au3> #include <Misc.au3> #include <TrayConstants.au3> ; Required for the $TRAY_CHECKED and $TRAY_ICONSTATE_SHOW constants. If UBound(ProcessList(@ScriptName)) > 2 Then Exit TraySetToolTip("Firefox Updater") HotKeySet("^!m", "MyExit") ; ctrl+Alt+m kills program ( hotkey ) Opt("TrayMenuMode", 3) ; The default tray menu items will not be shown and items are not checked when selected. These are options 1 and 2 for TrayMenuMode. Opt("TrayOnEventMode", 1) ; Enable TrayOnEventMode. TrayCreateItem("About") TrayItemSetOnEvent(-1, "About") TrayCreateItem("") ; Create a separator line. TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "ExitScript") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "About") ; Display the About MsgBox when the tray icon is double clicked on with the primary mouse button. TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. Local $sVersion, $CVersion, $ecode ;https://www.mozilla.org/en-US/firefox/developer/all/ ;https://www.mozilla.org/en-US/firefox/all/# ;https://www.mozilla.org/en-US/firefox/all/#en-US ;https://www.mozilla.org/en-US/firefox/beta/all/#en-US ;https://archive.mozilla.org/pub/firefox/candidates/48.0b1-candidates/build2/ ;https://archive.mozilla.org/pub/firefox/candidates/ getfiles() compare() killapps() uninstall() dlinstall() Exit Func killapps() ; kill firefox and plugin if running If FileExists("C:\Program Files\Mozilla Firefox\") Then $cmd = "taskkill.exe /im firefox.exe /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) $cmd = "taskkill.exe /im plugin* /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) Call("remcfg64") EndIf If FileExists("C:\Program Files (x86)\Mozilla Firefox\") Then $cmd = "taskkill.exe /im firefox.exe /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) $cmd = "taskkill.exe /im plugin* /f /t" RunWait('"' & @ComSpec & '" /c ' & $cmd, @SystemDir, @SW_HIDE) Sleep(300) Call("remcfg32") EndIf EndFunc ;==>killapps Func remcfg64() ; delete existing config file if exist $SSlist = _FileListToArrayRec("C:\Program Files\Mozilla Firefox\", "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) For $i = 1 To UBound($SSlist) - 1 If StringInStr($SSlist[$i], "mozilla.cfg") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "override.ini") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "local-settings.js") > 1 Then FileDelete($SSlist[$i]) EndIf Next EndFunc ;==>remcfg64 Func remcfg32() $SSlist = _FileListToArrayRec("C:\Program Files (x86)\Mozilla Firefox\", "*", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) For $i = 1 To UBound($SSlist) - 1 If StringInStr($SSlist[$i], "mozilla.cfg") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "override.ini") > 1 Then FileDelete($SSlist[$i]) ElseIf StringInStr($SSlist[$i], "local-settings.js") > 1 Then FileDelete($SSlist[$i]) EndIf Next EndFunc ;==>remcfg32 Func uninstall() ; uninstall existing Firefox If FileExists("C:\Program Files\Mozilla Firefox\Firefox.exe") Then ShellExecuteWait("helper.exe", " /S", "C:\Program Files\Mozilla Firefox\uninstall") EndIf If FileExists("C:\Program Files (x86)\Mozilla Firefox\Firefox.exe") Then ShellExecuteWait("helper.exe", " /S", "C:\Program Files (x86)\Mozilla Firefox\uninstall") EndIf Sleep(1500) DirRemove("C:\Program Files (x86)\Mozilla Firefox\", 1) DirRemove("C:\Program Files\Mozilla Firefox\", 1) EndFunc ;==>uninstall Func getfiles() ; get latest download Local $sTxt, $sTxt1 $xjs = "C:\windows\temp\xjs.tmp" $xjs1 = "C:\windows\temp\xjs1.tmp" ;$sSite = "https://www.mozilla.org/en-US/firefox/beta/all/" $sSite = "https://www.mozilla.org/en-US/firefox/all/" ;$sNotes = "https://www.mozilla.org/en-US/firefox/beta/notes/" $sNotes = "https://www.mozilla.org/en-US/firefox/notes/" SplashTextOn("Progress", "", 210, 75, -1, -1, 18, "Tahoma", 10) ControlSetText("Progress", "", "Static1", "Initializing", 2) $source = _INetGetSource($sSite) $sTxt = StringSplit($source, @LF) $q = 0 $i = 0 For $i = 1 To UBound($sTxt) - 1 ; is like saying read the line number ;GUIGetMsg();prevent high cpu usage If StringInStr($sTxt[$i], "=win64&amp;lang=en-US") > 1 Then $sActiveX1 = StringSplit($sTxt[$i], 'href="', 1) $sActiveX2 = StringSplit($sActiveX1[2], '"') Global $dia = $sActiveX2[1] $q = 1 EndIf If UBound($sTxt) - 1 = $i Then $ecode = '404' EventLog() Exit EndIf If $q = 1 Then ExitLoop EndIf Next ; FIND VERSION $source = _INetGetSource($sNotes) $sTxt1 = StringSplit($source, @LF) $q = 0 $i = 0 For $i = 1 To UBound($sTxt1) - 1 ; is like saying read the line number ;GUIGetMsg();prevent high cpu usage If StringInStr($sTxt1[$i], "<title>Firefox") > 1 Then $sActiveX1 = StringSplit($sTxt1[$i], '<title>Firefox', 1) $sActiveX2 = StringSplit($sActiveX1[2], ',') $sVersion = StringStripWS($sActiveX2[1], 3) $q = 1 EndIf If $sVersion = "" Then ; error correcting if mozilla changes page where version notes are located. $sVersion = "Current Version" EndIf If $q = 1 Then ExitLoop EndIf Next SplashOff() EndFunc ;==>getfiles Func dlinstall() ; download and install $Version = $sVersion & " - 64 bit" _webDownloader($dia, "FFInstall.exe", $Version) SplashTextOn("Progress", "", 210, 75, -1, -1, 18, "Tahoma", 10) ControlSetText("Progress", "", "Static1", "Installing Version " & $sVersion, 2) ShellExecuteWait("FFInstall.exe", " -ms", "C:\Windows\Temp\") If FileExists(@ScriptDir & "\mozilla.cfg") Then FileCopy(@ScriptDir & "\mozilla.cfg", "C:\Program Files\Mozilla Firefox\mozilla.cfg", 1) Else FileInstall("G:\Users\username\Documents\Project\FirefoxDefault\mozilla.cfg", "C:\Program Files\Mozilla Firefox\mozilla.cfg", 1) EndIf FileWrite("C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js", 'pref("general.config.obscure_value", 0);' & @CRLF & 'pref("general.config.filename", "mozilla.cfg");' & @CRLF) FileWrite("C:\Program Files\Mozilla Firefox\browser\override.ini", '[XRE]' & @CRLF & 'EnableProfileMigrator=false' & @CRLF) FileDelete("C:\windows\temp\" & "\FFInstall.exe") $CVersion = FileGetVersion('C:\Program Files\Mozilla Firefox\firefox.exe', $FV_PRODUCTVERSION) SplashOff() EndFunc ;==>dlinstall Func _webDownloader($sSourceURL, $sTargetName, $sVisibleName, $sTargetDir = "C:\windows\temp", $bProgressOff = True, $iEndMsgTime = 2000, $sDownloaderTitle = "Mozilla Firefox") ; Declare some general vars Local $iMBbytes = 1048576 ; If the target directory doesn't exist -> create the dir If Not FileExists($sTargetDir) Then DirCreate($sTargetDir) ; Get download and target info Local $sTargetPath = $sTargetDir & "\" & $sTargetName Local $iFileSize = InetGetSize($sSourceURL) Local $hFileDownload = InetGet($sSourceURL, $sTargetPath, $INET_LOCALCACHE, $INET_DOWNLOADBACKGROUND) ; Show progress UI ProgressOn($sDownloaderTitle, "" & $sVisibleName) GUISetFont(8, 400) ; Keep checking until download completed Do Sleep(250) ; Set vars Local $iDLPercentage = Round(InetGetInfo($hFileDownload, $INET_DOWNLOADREAD) * 100 / $iFileSize, 0) Local $iDLBytes = Round(InetGetInfo($hFileDownload, $INET_DOWNLOADREAD) / $iMBbytes, 2) Local $iDLTotalBytes = Round($iFileSize / $iMBbytes, 2) ; Update progress UI If IsNumber($iDLBytes) And $iDLBytes >= 0 Then ProgressSet($iDLPercentage, $iDLPercentage & "% - Downloaded " & $iDLBytes & " MB of " & $iDLTotalBytes & " MB") Else ProgressSet(0, "Downloading '" & $sVisibleName & "'") EndIf Until InetGetInfo($hFileDownload, $INET_DOWNLOADCOMPLETE) ; If the download was successfull, return the target location If InetGetInfo($hFileDownload, $INET_DOWNLOADSUCCESS) Then ProgressSet(100, "Downloading '" & $sVisibleName & "' completed") If $bProgressOff Then Sleep($iEndMsgTime) ProgressOff() EndIf Return $sTargetPath ; If the download failed, set @error and return False Else Local $errorCode = InetGetInfo($hFileDownload, $INET_DOWNLOADERROR) ProgressSet(0, "Downloading '" & $sVisibleName & "' failed." & @CRLF & "Error code: " & $errorCode) If $bProgressOff Then Sleep($iEndMsgTime) ProgressOff() EndIf SetError(1, $errorCode, False) FileDelete("C:\windows\temp\" & "\FFInstall.exe") SplashOff() EndIf EndFunc ;==>_webDownloader Func compare() $CVersion = FileGetVersion('C:\Program Files\Mozilla Firefox\firefox.exe', $FV_PRODUCTVERSION) If $sVersion = $CVersion Then $ecode = '411' MsgBox(64, "Firefox says:", 'You have the latest version ' & $CVersion , 5) EventLog() Exit EndIf EndFunc ;==>compare Func EventLog() If $ecode = '404' Then Local $hEventLog, $aData[4] = [0, 4, 0, 4] $hEventLog = _EventLog__Open("", "Application") _EventLog__Report($hEventLog, 1, 0, 404, @UserName, @UserName & ' No "exe" found for Mozilla Firefox. The webpage and/or download link might have changed. ' & @CRLF, $aData) _EventLog__Close($hEventLog) EndIf If $ecode = '411' Then Local $hEventLog, $aData[4] = [0, 4, 1, 1] $hEventLog = _EventLog__Open("", "Application") _EventLog__Report($hEventLog, 0, 0, 411, @UserName, @UserName & " Mozilla Firefox " & "version " & $CVersion & " successfully installed." & @CRLF, $aData) _EventLog__Close($hEventLog) EndIf EndFunc ;==>EventLog Func MyExit() Exit EndFunc ;==>MyExit Func About() ; Display a message box about the AutoIt version and installation path of the AutoIt executable. MsgBox($MB_SYSTEMMODAL, "", "Firefox Update Tool" & @CRLF & @CRLF & _ "Version: 2.5.0.0" & @CRLF & _ "Firefox Updater by Carm0@Sourceforge" & @CRLF & "CTRL+ALT+m to kill", 5) ; Find the folder of a full path. EndFunc ;==>About Func ExitScript() Exit EndFunc ;==>ExitScript #comments-start http://superuser.com/questions/823530/change-some-default-settings-for-firefox-globally http://mxr.mozilla.org/mozilla-release/source/browser/app/profile/firefox.js#387 http://smallbusiness.chron.com/change-default-homepage-users-54727.html https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/ https://wiki.mozilla.org/Installer:Command_Line_Arguments https://support.mozilla.org/en-US/questions/971189 http://forums.mozillazine.org/viewtopic.php?p=2228066 http://forums.mozillazine.org/viewtopic.php?f=38&t=2950829 ; updates auto http://forums.mozillazine.org/viewtopic.php?f=8&t=2753795 http://superuser.com/questions/697018/how-to-disable-popups-in-firefox-without-add-ons http://www.itninja.com/blog/view/deploy-popup-allowed-sites-with-firefox deploy with certain opous enabled #ce Mozilla.cfg file: // pref("browser.search.geoSpecificDefaults", false); pref("browser.search.defaultenginename.US", "data:text/plain,browser.search.defaultenginename.US=Google"); //https://support.mozilla.org/en-US/questions/1034136 // set Firefox Default homepage defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://www.startpage.com/do/mypage.pl?prf=381c658b828c3fe50ec7563137fef98f"); // Don't show WhatsNew on first run after every update pref("browser.startup.homepage_override.mstone","ignore"); // disables the 'know your rights' button from displaying on first run pref("browser.rights.3.shown", true); pref("browser.usedOnWindows10", true); pref("browser.rights.override", true); // Do not perform system default browser check on startup pref("browser.shell.checkDefaultBrowser", false); // set all plugins to always activated - two settings pref("plugin.default.state", 2); // https://support.mozilla.org/en-US/questions/982143 reference about click to play flash // set flash and silverlight always ask = 1 always activate = 2 defaultPref("plugin.state.flash", 2); // hide choose what i share which pops up at the bottom after a minute lockPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); // https://groups.google.com/forum/#!topic/mozilla.support.firefox/DRXvfTA6Hnc //disable the "Improve Firefox" suggestion pref("toolkit.telemetry.prompted", 2); //https://support.mozilla.org/en-US/questions/898549 // do not block popups - can only be default or locked pref defaultPref("dom.disable_open_during_load", false); //http://superuser.com/questions/697018/how-to-disable-popups-in-firefox-without-add-ons //lockpref("privacy.sanitize.migrateFx3Prefs", true); // http://www.pcc-services.com/kixtart/firefox-lockdown.html //pref("browser.privatebrowsing.autostart", true); // prevent reader view from popping down at the top pref("reader.parse-on-load.enabled",false); // click to play - disabled so you are not prompted - https://support.mozilla.org/en-US/questions/934809 pref("plugins.click_to_play", false); // below will set the cache only to clear on exit, you need to tell it what to do with the reset of the data not just cache leave cache out. Just add a '\\' to whatever you want to clear on browser exit. //defaultPref("privacy.clearOnShutdown.cookies", false); defaultPref("privacy.clearOnShutdown.downloads", false); defaultPref("privacy.clearOnShutdown.formdata", false); defaultPref("privacy.clearOnShutdown.history", false); defaultPref("privacy.clearOnShutdown.sessions", false); defaultPref("privacy.sanitize.migrateClearSavedPwdsOnExit", false); defaultPref("privacy.sanitize.sanitizeOnShutdown", true); //pref("browser.privatebrowsing.autostart", true); //prevent autoplay https://support.mozilla.org/en-US/questions/1103127 //defaultPref("media.autoplay.enabled", false); //https://wiki.mozilla.org/Electrolysis //pref("browser.tabs.remote.autostart", true); //pref("browser.tabs.remote.force-enable", true); // ref: http://www.itninja.com/question/firefox-22-for-enterprise-deployment-default-preferences // Prevent refresh message showing at the bottom if firefox is not used in a while - http://techdows.com/2016/05/firefox-reinstall-to-prompt-for-a-refresh.html https://support.mozilla.org/en-US/questions/1084402 pref("browser.disableResetPrompt", true); // disable plugin check - https://support.mozilla.org/en-US/questions/968056 //defaultPref("plugin.scan.plid.all",false); //defaultPref("plugins.update.url",""); // disable remember preferences //defaultPref("signon.rememberSignons", false); //https://twitter.com/HighTechDad/status/955916813178691584 //https://t.co/YTvSy9EBJ1 // defaultPref can also be lockPref defaultPref("privacy.donottrackheader.enabled", true); //defaultPref("privacy.trackingprotection.enabled", true); lockPref("privacy.trackingprotection.introCount", 20);
  18. Hello, usually I do Win automations, so I have no skills at all to handle HTML forms :-/ The script to catch and syntax check the required information from Excel is done. Now I'd like to automate the upload using this form, too: http://flashcardsdeluxe.com/flashcards/Upload.aspx What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself. TIA, Rudi.
  19. I have to open a URL on Mozilla Firefox , cursor is by default userid textbox, had to send userid, send tab, send pwd with flag 1 , send tab, send Enter. But Script is Failing to take Password. Any Help #include <Constants.au3> #include <IE.au3> #include <PassMask.au3> If $CmdLine[0] <> 3 Then MsgBox($MB_OK, "Usage", "ps_weblogin_FireFox <Url> <Browser Title> <Text to Send>") Else web_login($CmdLine[1], $CmdLine[2], $CmdLine[3]) EndIf Func web_login($bt_url, $bt_Title, $bt_SendText) Local $ff = Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe " & $bt_url) WinWaitActive($bt_Title) Sleep(2000) ControlSend("","","",$bt_SendText) EndFunc _______________________________________________ _______________________________________________ Func Mask_Password($Password) $MaskPassword = $Password $MaskPassword = StringReplace($MaskPassword, "#", "||||||#@@@@@@") $MaskPassword = StringReplace($MaskPassword, "!", "||||||!@@@@@@") $MaskPassword = StringReplace($MaskPassword, "+", "||||||+@@@@@@") $MaskPassword = StringReplace($MaskPassword, "^", "||||||^@@@@@@") $MaskPassword = StringReplace($MaskPassword, "{", "||||||{@@@@@@") $MaskPassword = StringReplace($MaskPassword, "}", "||||||}@@@@@@") $MaskPassword = StringReplace($MaskPassword, "||||||", "{") $MaskPassword = StringReplace($MaskPassword, "@@@@@@", "}") Return $MaskPassword EndFunc
  20. Profiler - yet another backup script for Firefox and Thunderbird profiles It automatically detects the last recently used profile directories of Firefox and Thunderbird (installed versions, no portables). Clicking the Backup-Button creates a complete Backup of the found profiles with a timestamp. Restore deletes the according profile dir and extracts the content of the selected archive into the profile directory. Uses Winrar as compression tool, but feel free to change it to your needs Best regards Marc Profiler.au3
  21. I'm trying to get the output data from https://www.guilded.gg but it uses a web app that generates that output on the fly and this doesn't show up in the page source. Only in web inspector of each browser does this data show up. How do I read this data in autoit (equivalent to the web inspector) thank you
  22. Hello, I've recently updated from Firefox 50 to 54.0.1. My Autoit script that previously worked fine, now seems to have erratic problems. It's almost as if some Send() commands are sometimes skipped when dealing with the Firefox UI (it's still mostly fine on the actual pages). To temporarly fix the problem, I had to put some Sleep(200) pauses and avoid grouping keys together (e.g: TAB 2), but I'm not exactly sure about the correct way to deal with this.. Could this be caused by the new multiprocess feature? (e10s) Are there better Autoit commands or rules that I should use?
  23. Hello. We work with the BMC Remedy site to manage incidents and would like to automate the processes of clicking through this button code: <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> I use firefox with mozrepl and autoit with include FF.au3 I need your help I read the topic https://www.autoitscript.com/forum/topic/95595-ffau3-v0601b-10/ but I could not run the code from the listed commands ... It is necessary to press the button and from the list of the menu of cahorsations to select the item = "zone of trust abonent" Screen # 1 http://joxi.ru/52aJK7bh4a7ypA or below. 1) Press button <a href="javascript:" class="btn btn3d menu" style="top:21; left:184; width:21; height:21;"> <img class="btnimg" src="../../../../resources/images/mt_sprites.gif" alt="menu category issue" title=""> </a> 2) After pressing the button, I need to choose in this menu of 4 items to select an item called "zone of trust abonent", Screen # 2 - http://joxi.ru/p27gwQKHo71VQ2 html code table items <table class="MenuTable" cellpadding="0" cellspacing="0" style="width: 179px;"> <tbody class="MenuTableBody"> <tr class="MenuTableRow"> <td class="MenuEntryName" nowrap="">zone of trust abonent</td> <td class="MenuEntryNoSub" arvalue="zone of trust abonent"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust operator"></td> </tr> <tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">zone of trust third operator</td> <td class="MenuEntryNoSub" arvalue="zone of trust third operator"></td></tr> <tr class="MenuTableRow"><td class="MenuEntryNameHover" nowrap="">No settings</td> <td class="MenuEntryNoSubHover" arvalue="No settings"></td> </tr> </tbody> </table> More in detail, I choose from the menu item "zone of trust abonent" Screen # 3 - http://joxi.ru/GrqVq4ZIQEPW4m 3) The choice is made, Screen # 4 http://joxi.ru/v297w6aC3PovLr <textarea class="text sr " wrap="off" id="arid_WIN_0_1000002488" cols="20" maxlen="60" style="top:21; left:0; width:179; height:21;" armenu="CFG:PRC:CategoryHPD-Res-T1-Q" mstyle="2" arautoc="1" arautocmb="1" arautocak="0" arautoctt="400" rows="1"> </textarea> It's all. I would be very grateful to you =) !!!!!!!!!! Here are more detailed codes in the attachment. button1.txt menu - table.txt all.txt
  24. How can I check if element is focused in Firefox using FF.au3 UDF? This is my try: I have prepared a function that checks if the object is focused: _FFCmd('FFau3.isfocused=function isfocused(a){try{return (a === document.activeElement)}catch(e){return}}') $oElm = _FFXPath("//*[@id='someId']") ConsoleWrite(_FFIsFocused($oElm)) Func _FFIsFocused($sElement = "") Local $isFoc = _FFCmd("FFau3.isfocused(" & $sElement & ")") Return $isFoc EndFunc ;==>_FFIsFocused Now, the javascript part is tested and it does return successfully. After a lot of try/fails I inserted an alert box in order to display the object being compared. Here is what I got The focused object is: [object XULElement] The object that I send for comparing is [object HTMLInputElement] Why is that?
  25. Is it possible to know if a textbox is active in FireFox? This is what I want: if (Textbox in FireFox == Active) { }
×
×
  • Create New...