HighlanderSword Posted July 12, 2013 Posted July 12, 2013 Hello, The URLS are internal to our company so you wouldnt be able to open them. Thanks Paul
HighlanderSword Posted July 12, 2013 Posted July 12, 2013 (edited) Hello, Im working on another Automation task with FF udf I need to click on a Button that does not have an ID assigned The label on the Button is Search , and it calles a Java function. I have tried using the java wrapper call function ( FFCmd("content.wrappedJSObject.search(document.forms[0])")) , but that did not work. How would I go about doing this ? I have place a copy of the HTML below Thanks Paul <form method="post"> <input name="searchMethod" type="hidden" value="search_selectuser"><input name="searchType" type="hidden" value="portaluserSelect"><input name="searchStyle" type="hidden" value="portaluserSelect"><input name="embedded" type="hidden" value="false"><input name="offset" type="hidden" value="0"><input name="increment" type="hidden" value="20"><input value="false" name="newwindow" type="hidden"><input name="searchFilter" type="hidden" value=""><input name="assignToElement" type="hidden" value="uid"><input name="popup" type="hidden" value="true"> <div class="content"> <h3>User Search Results</h3> <em>** Remember, when using the User ID search, that this is an exact match search. If you do NOT know the User ID exactly, please use the Last Name search.</em> <table class="searchTable"> <tr> <th>Search By:</th><td><input onfocus="selectuserRB(this.form,'uid');clearSearchEmailAddr(this.form);clearSearchUserName(this.form)" value="uid" name="userRB" class="inputnoborder" type="radio"></td><td align="left">User ID:</td><td colspan="4"><input onfocus="selectuserRB(this.form,'uid');clearSearchUserName(this.form);clearSearchEmailAddr(this.form)" size="60" name="searchuid"></td> </tr> <tr> <td> </td><td><input onfocus="selectuserRB(this.form,'emailaddr');clearSearchUID(this.form);clearSearchUserName(this.form)" value="emailaddr" name="userRB" class="inputnoborder" type="radio"></td><td align="left">Email Address:</td><td colspan="4"><input onfocus="selectuserRB(this.form,'emailaddr');clearSearchUID(this.form);clearSearchUserName(this.form)" size="60" name="mail"></td> </tr> <tr> <td> </td><td><input onclick="clearSearchUID(this.form);clearSearchEmailAddr(this.form);" value="username" name="userRB" class="inputnoborder" type="radio" checked></td><td align="left">Last Name:</td><td><input onfocus="selectuserRB(this.form,'username');clearSearchUID(this.form);clearSearchEmailAddr(this.form);" size="20" name="sn"></td><td> </td><td align="right">First Name:</td><td><input onfocus="selectuserRB(this.form,'username');clearSearchUID(this.form);clearSearchEmailAddr(this.form);" size="20" name="givenname"></td> </tr> <tr> <td> </td><td> </td><td> </td><td align="right"><em>exact match: </em><input class="inputnoborder" value="EMsn" name="EMsn" type="checkbox"></td><td> </td><td> </td><td align="right"><em>exact match: </em><input class="inputnoborder" value="EMgivenname" name="EMgivenname" type="checkbox"></td> </tr> </table> <div class="actionsRow"> <a class="cssbutton" href="javascript:search(document.forms[0])"> Search </a> </div> <table class="resultsTable"> <thead> <tr> <th>Select</th><th>User Name</th><th>User ID</th><th>Company</th><th>Status</th><th>Relationship</th> </tr> </thead> <tbody></tbody> </table> </div> </form> </body> </html> Edited July 12, 2013 by HighlanderSword
careca Posted July 12, 2013 Posted July 12, 2013 hello, i usually use the firefox inspector, and its seems to retrieve clearer code. Having some problems too in my code, sometimes it works, other times won't. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
careca Posted July 13, 2013 Posted July 13, 2013 Got this code: <a id="skip_button" target="_top" style="position: absolute; width: 300px; text-align: right; height: 30px; top: 10px; right: 20px; color: rgb(255, 255, 255); font-weight: bold; font-size: 16px;" href="http://go4up.com/dl/1mcu1eqhLRd4"> <img id="skip_ad_button" height="39" alt="Skip Ad" src="http://cdn.adf.ly/static/image/skip_ad/en.png"></img> </a> how do i check if skip_ad_button has appeared, in order to click it? Or even better would be to use the link above that. Here's what i got: Do $PE = ProcessExists('firefox.exe') If $PE <> 0 Then _FFIsConnected() If @error Then _FFConnect() EndIf EndIf Sleep(500) ;_FFClick('skip_button', 'id') ;_FFImageClick('skip_ad_button', "id", False) Check() Until $PE = 1234567890 Func Check() ;$Val = _FFGetValue('skip_button', 'id') $Val = _FFObjGet('skip_button', 'id') If $Val = '' Then ConsoleWrite($Val&' Skip Button Not Found' & @CRLF) Check() Else ConsoleWrite('Legit!' & @CRLF) _FFImageClick('skip_button', "id", False) _FFClick('skip_button', 'id') EndIf EndFunc Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
TheEconomist Posted July 29, 2013 Posted July 29, 2013 Sorry for my noobness, I'm new to this. I am using the FF.au3 version that has the download link on the first page (0.6.0.1b-3). Is that the last version? I'm running this on FF 22 with MozRepl 1.1.2. When I call $started=_FFStart("www.startpage.com") it opens two FF windows, one with the page I requested and another with the port written on the address bar and "Unable to connect. Firefox can't establish a connection to the server at 4242.". Alas, @error is set to 0, function returns 1, and there seems to be no error reported in the debug: __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.startpage.com" -repl 4242 _FFConnect: OS: WIN_2008R2 WIN32_NT 7601 Service Pack 1 _FFConnect: AutoIt: 3.3.8.1 _FFConnect: FF.au3: 0.6.0.1b-3 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 512 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 __FFSendJavaScripts: Sending functions to FireFox .......... done _FFLoadWait: . loaded in 11ms Did I do everything ok ? Is this intended behaviour ?
Danp2 Posted July 29, 2013 Posted July 29, 2013 There are newer versions posted later in this thread where that issue is resolved. Latest Webdriver UDF Release Webdriver Wiki FAQs
TheEconomist Posted July 29, 2013 Posted July 29, 2013 There are newer versions posted later in this thread where that issue is resolved. Thanks man, I put V0.6.0.1b-8 and I don't have that bug anymore.
TheEconomist Posted July 29, 2013 Posted July 29, 2013 Is there a way to download the MozRepl as a separate XPI file ? (I wanna keep separate copies of FF, MozRepl and FF.au3...,so that if something is not gonna work or be available in the future I have copies for stuff that works)
Danp2 Posted July 30, 2013 Posted July 30, 2013 Go here, right click on the Add To Firefox button, and then select Save Link As... option. Latest Webdriver UDF Release Webdriver Wiki FAQs
TheEconomist Posted July 30, 2013 Posted July 30, 2013 Go here, right click on the Add To Firefox button, and then select Save Link As... option. Nifty!
zbigj Posted August 21, 2013 Posted August 21, 2013 (edited) Hi, could you tell me, how to select a FF window WITH PROFILE? I tried to do something like this: #include "FF.au3" _FFstart("www.google.com","1",9) _FFWIndowSelect() _FFOpenURL('www.wp.pl') with already opened any other FF window . 'www.wp.pl' url opens in first opened window. How to force my window (google.com in this case) to be selected? I MUST work with profiles Included Output: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\Program Files\AutoIt3\testWielowatkowy.au3" /UserParams +>23:16:28 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0415 Keyboard:00000415 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:C:\Program Files (x86)\AutoIt3 +>23:16:28 AU3Check ended.rc:0 >Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "D:\Program Files\AutoIt3\testWielowatkowy.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop __FFStartProcess: ""D:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "http://www.onet.pl" -no-remote "-repl 4242" -P "1" _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1 _FFConnect: AutoIt: 3.3.8.1 _FFConnect: FF.au3: 0.6.0.1b-7 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 664 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 __FFSendJavaScripts: Sending functions to FireFox .......... done _FFLoadWait: . loaded in 10ms [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} __FFSend: try{repl.enter(Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser"))}catch(e){'_FFCmd_Err';}; __FFRecv: [object ChromeWindow] - {0: {...}, 1: {...}, 2: {...}, 3: {...}, 4: {...}, 5: {...}, 6: {...}, ...} __FFSend: try{FFau3.tmp=document.title;document.title='FFAU31105889534'}catch(e){'_FFCmd_Err';}; __FFRecv: FFAU31105889534 __FFSend: try{document.title=FFau3.tmp}catch(e){'_FFCmd_Err';}; __FFRecv: 2 : Wirtualna Polska - www.wp.pl - Mozilla Firefox _FFWindowGetHandle: _FFOpenURL: http://www.wp.pl __FFSend: try{window.content.top.document.location.href='http://www.wp.pl'}catch(e){'_FFCmd_Err';}; _FFWindowGetHandle ==> General Error __FFRecv: http://www.wp.pl _FFLoadWait: ....... loaded in 1680ms [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} __FFSend: FFau3.WCD=window.content.top.document; __FFRecv: [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} +>23:16:35 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 8.180 I asked EVERYONE and work with it 5 weeks. Any help? Edited August 21, 2013 by zbigj
careca Posted August 21, 2013 Posted August 21, 2013 General answer i think would be winactivate, but i don't quite get what you mean with profiles, i think i do, you can be talking about firefox profiles, and i know you can select the one to use at start, but i don't think you can use different profiles in different windows. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
zbigj Posted August 21, 2013 Posted August 21, 2013 Thanks to firefox profiles I can have separate FF windows with separate cookies, tabs and so on. And when I run Firefox with option -no-remote (firefox.exe -P profileName -no-remote) then I can use many windows with different profiles in the same time. _FFStart(url, nameOfProfile, 9) is made for profiles - 9 =1+8, 1 is for new window and 8 is to include -no-remote switch. Winactivate will make my window active, and perhaps (I don't know) make a focus with that window, but I want to concentrate FF.au3 on that window, I mean every next _FF function will operat on this window. Generally _FFWindowSelect(title or url) is for that purpose, but it doesn't work with _FFStart(...,nameOfProfile,..) I tried to debug output, but I'm just medium autoit programmer and didn't master Javascript and MozRepl yet.
careca Posted August 21, 2013 Posted August 21, 2013 hmm i see, have you tried to reconnect? Maybe if you reconnect it will focus in there. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Stilgar Posted September 14, 2013 Author Posted September 14, 2013 (edited) Updated test-version to: V0.6.0.1b-9:http://thorsten-willert.de/Themen/FFau3/Testversion/FF%20V0.6.0.1b-9.au3V0.6.0.1b-9 - Added: __FFStartProcess: 64bit support - Added: __FFIsURL: support for intranet - Changed: _FFQuit now closes FireFox with multiple windows - Fixed: Connection-limit to MozRepl V0.6.0.1b-8 (by Danp2) - Changed: _FFTabExists to allow search by href - Changed: _FFTabSetSelected to allow selection by href - Changed: SelectWin to check individual tabs - Added: FFau3.SearchTabURL helper function - Fixed: __FFStartProcess (4242 port error) - Fixed: _FFGetPositionhttp://thorsten-willert.de/Themen/FFau3/Testversion/FF.changelog.txt Edited September 14, 2013 by Stilgar jEdit4AutoIt PlanMaker_UDF
Iczer Posted September 15, 2013 Posted September 15, 2013 Updated test-version to: V0.6.0.1b-9: Download functions not included? (especially to start download) Any hope for new help file with examples?
Stilgar Posted September 15, 2013 Author Posted September 15, 2013 (edited) Download functions not included? (especially to start download) Any hope for new help file with examples? There's an UDF(_FF_DM.au3) for the FireFox-Downloadmanager: http://thorsten-willert.de/Themen/FFau3/FF_AddOns_UDFs/files To start a download you can click on the download link (_FFClick) An updated for the help file is in work. Edited September 15, 2013 by Stilgar jEdit4AutoIt PlanMaker_UDF
EKY32 Posted September 15, 2013 Posted September 15, 2013 Thank you, is it possible to embedded FF like IE as in the old versions of Firefox? the say in the website that they stpopped supporting mozilla firefox activex control, and this project was doing great before it stops too. [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
Stilgar Posted September 15, 2013 Author Posted September 15, 2013 (edited) Thank you, is it possible to embedded FF like IE as in the old versions of Firefox? the say in the website that they stpopped supporting mozilla firefox activex control, and this project was doing great before it stops too. No, It's not possible to embed FF and there's no working activex control. But you can look at this example ((quick-and-dirty hack): Embedded FireFox Edited September 15, 2013 by Stilgar jEdit4AutoIt PlanMaker_UDF
EKY32 Posted September 15, 2013 Posted September 15, 2013 (edited) No, It's not possible to embed FF and there's no working activex control. But you can look at this example ((quick-and-dirty hack): Embedded FireFox Well thank you, Didn't work on Win XP, and on Win 7 x64 it made th system freeze until i closed the process. No errors, Last AutoIt Release. Edited September 15, 2013 by EKY32 [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now