stenioc1 Posted March 18, 2014 Author Posted March 18, 2014 The following error is appearing: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" /UserParams +>08:20:48 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3"(29,1) : error: syntax error EndIf ^ C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3 - 1 error(s), 0 warning(s) !>08:20:48 AU3Check ended. Press F4 to jump to next error.rc:2 +>08:20:49 AutoIt3Wrapper Finished.. >Exit code: 2 Time: 0.455
Danp2 Posted March 18, 2014 Posted March 18, 2014 Change the last line to "Next" instead of "Endif". Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 18, 2014 Author Posted March 18, 2014 Unfortunately not working: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" /UserParams +>08:50:11 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 +>08:50:11 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop +>08:50:24 AutoIt3.exe ended.rc:0 +>08:50:24 AutoIt3Wrapper Finished.. >Exit code: 0 Time: 12.916
Danp2 Posted March 18, 2014 Posted March 18, 2014 It appears that this website uses frames. You will need to identify the frame containing the desired object, get a reference to it using _IEFrameGetCollection or _IEFrameGetObjByName, and then use this reference instead of $oIE to access the desired web content. Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 18, 2014 Author Posted March 18, 2014 I tried change my code and not work: Func ClickGrafic() Local $oFrame = _IEFrameGetObjByName($oIE, "WorkSpace.aspx") Local $oClickGrafic = _IEGetObjByName ($oFrame, "javascript:__doPostBack('dbbTopGraphic$_ctl0$ccTopGraphic','ABR%20-%20CONTROLE%20DE%20ACESSO%20UNIX%20(UX)')") _IEAction($oClickGrafic, "click") EndFunc ;==>ClickGrafic And logs: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" /UserParams +>15:38:41 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 +>15:38:41 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop --> IE.au3 T3.0-1 Warning from function _IEFrameGetObjByName, $_IEStatus_NoMatch (No frames matching name) --> IE.au3 T3.0-1 Error from function _IEGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 T3.0-1 Error from function _IEAction(click), $_IEStatus_InvalidDataType +>15:38:53 AutoIt3.exe ended.rc:0 +>15:38:53 AutoIt3Wrapper Finished.. >Exit code: 0 Time: 12.584 I don't understand what I did wrong Thanks
Danp2 Posted March 18, 2014 Posted March 18, 2014 Improper usage of _IEFrameGetObjByName, for one. You can't just call it with the name of the aspx file. You have to use the actual name of the frame. Suggest that you review the help file entry and try running the code sample there. Then examine the resulting web page to learn how to identify the name of the desired frame. Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 19, 2014 Author Posted March 19, 2014 I think I found another way to perform the action, but I need help from you, as you would use the mouse click event to a iframe with the link with this code, I want to accomplish with the get the object 6851195: <div style="COLOR: white; cursor:pointer; font-weight:bold" onclick="goToChamado('parm=EJTRk52TpVjSOMpsVpIkbHzRL2TvkRRrsipkT0ovFEcfTUViZRWRQMMBbqS2ILFQMOF2tZbtdD8U8lzFe7AGL40ra7pJxQ%2fhvE5eI11ATHfBwspFlPHMhE6fRJ9S9eSN8Xv3Ji1laofL5wcoy6mevVHD5p50c13dO3ksWXG4%2fg3mJRlmuWTBSR2nwk4DZsLDHg%3d%3d')">6851195</div> Thanks
Danp2 Posted March 19, 2014 Posted March 19, 2014 You still haven't provided enough information for us to provide further assistance. You have to determine which frame contains the desired elements. Run this code in your ClickGrafic function and post the Output window results: Local $oFrames = _IEFrameGetCollection($oIE) Local $iNumFrames = @extended ConsoleWrite($iNumFrames & " frames found" & @CRLF ) Local $oFrame = 0 For $i = 0 To ($iNumFrames - 1) $oFrame = _IEFrameGetCollection($oIE, $i) ConsoleWrite($i & ' - ' & $oFrame.name & @CRLF) $oClickGrafic = _IEGetObjByName($oFrame, "MapdbbTopGraphic:_ct10:ccTopGraphic") If Not @error Then ConsoleWrite("Found area element!" & @CRLF) EndIf Next Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 19, 2014 Author Posted March 19, 2014 Thanks for help, below the output: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" /UserParams +>11:26:29 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000416 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 +>11:26:29 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\cordeirs\Desktop\Projetos\AutoIT\new2.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop 2 frames found 0 - banner --> IE.au3 T3.0-1 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: MapdbbTopGraphic:_ct10:ccTopGraphic, Index: 0) 1 - contents --> IE.au3 T3.0-1 Warning from function _IEGetObjByName, $_IEStatus_NoMatch (Name: MapdbbTopGraphic:_ct10:ccTopGraphic, Index: 0) +>11:26:51 AutoIt3.exe ended.rc:0 +>11:26:51 AutoIt3Wrapper Finished.. >Exit code: 0 Time: 23.014
Danp2 Posted March 19, 2014 Posted March 19, 2014 I doubt that we will be able to assist you further without having access to the website. What is Moebius.net anyway? Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 19, 2014 Author Posted March 19, 2014 Thanks for support Danp2, attached I am sending you the website files, is what I do, because I'm not an administrator of this server Projetos.rar
Solution Danp2 Posted March 19, 2014 Solution Posted March 19, 2014 This should be enough to get you going: #include <IE.au3> $oIE = _IEAttach('MOEBIUS') $oFrame1 = _IEFrameGetObjByName($oIE, 'contents') $oFrame2 = _IEFrameGetObjByName($oFrame1, 'main') Local $oAreas = _IETagNameGetCollection($oFrame2, "area") if Not @error Then ConsoleWrite("Found " & @extended & " area elements!" & @CRLF) Else ConsoleWrite("_IETagNameGetCollection found nothing!" & @CRLF) EndIf For $oArea In $oAreas ConsoleWrite($oArea & @CRLF) _IEAction($oArea, 'click') Next Latest Webdriver UDF Release Webdriver Wiki FAQs
stenioc1 Posted March 19, 2014 Author Posted March 19, 2014 It's working now Danp2 Thank you for help
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