MRAJ Posted May 9, 2018 Posted May 9, 2018 Hi, I am not able to click on Document List in SAP Businessobject Infoview page that takes me to Public folder page. Below is the HTML page. <SPAN id=IconImg_Txt_btnListing class=iconText style="WHITE-SPACE: nowrap">Document List</SPAN> Please let me know how to achieve.
Moderators JLogan3o13 Posted May 9, 2018 Moderators Posted May 9, 2018 #1, moved to the appropriate forum, as the DEV forum very clearly states: Quote Do not create AutoIt-related topics here, use AutoIt General Help and Support #2, How about showing what you have tried on your own? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 Hi, I am not able to click on Document List in SAP Businessobject Infoview page that takes me to Public folder page. Below is the HTML page. <SPAN id=IconImg_Txt_btnListing class=iconText style="WHITE-SPACE: nowrap">Document List</SPAN> Please let me know how to achieve.
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 $oAs = _IETagnameGetCollection($oIE, "span") for $oA in $oAs If StringInStr($oA.outertext, "Document List") Then _IEAction($oA, "click") EndIf Next I tried even with IELinkclickbytext but no result.
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 Local $oElements = _IETagNameGetCollection($oIE, "SPAN") For $oElement In $oElements If $oElement.ClassName = "iconText" And $oElement.outerText = "Document List" Then _IEAction($oElement, "click") EndIf Next tried this too but not clicking on document list
Moderators JLogan3o13 Posted May 9, 2018 Moderators Posted May 9, 2018 Stick to one topic please. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Danp2 Posted May 9, 2018 Posted May 9, 2018 Have you tried using innerText instead of outerText? Latest Webdriver UDF Release Webdriver Wiki FAQs
Danp2 Posted May 9, 2018 Posted May 9, 2018 I suggest that you add some logging to your script so that you can determine if the element is even being located. You could also try this version -- $oSpan = _IEGetObjById($oIE, "IconImg_Txt_btnListing") _IEAction($oSpan, "click") Latest Webdriver UDF Release Webdriver Wiki FAQs
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 i tired the below script but it is not clicking still. $oSpan = _IEGetObjById($oIE, "IconImg_Txt_btnListing") _IEAction($oSpan, "click")
Danp2 Posted May 9, 2018 Posted May 9, 2018 @MRAJ It doesn't help move the discussion forward when you respond and state "It doesn't work." If you want help in solving your issue, then you need to provide further details. For example, what results do you get in the Output panel when you run the above code in Scite? Please post that information here. P.S. My best guess is that the element is being clicked. However, there is likely an event attached to the element that isn't being triggered by the standard _IE functions and this will take some "special handling" to make it work as desired. Latest Webdriver UDF Release Webdriver Wiki FAQs
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 When i am running the script..it will login and SAP page will come where i have to click on document list..but it is not showing any output..the page remain same and it stops.. Below is my script: Local $oIE = _IECreate($URL,0,1) Local $email = "XX" Local $password = "yy" Sleep(2000) Local $hWnd = WinWait("InfoView - Internet Explorer","",5) Sleep(2000) ControlClick($hWnd, "InfoView - Internet Explorer", "[CLASS:Internet Explorer_Server; INSTANCE:1]") Sleep(2000) Send("{TAB}{TAB}XX{TAB}yy{ENTER}") Sleep(5000) Local $hWnd = WinWait("SAP BusinessObjects InfoView - Internet Explorer","",5) WinActivate($hWnd) Sleep(2000) $oSpan = _IEGetObjById($oIE, "IconImg_Txt_btnListing") _IEAction($oSpan, "click")
Danp2 Posted May 9, 2018 Posted May 9, 2018 22 minutes ago, Danp2 said: For example, what results do you get in the Output panel when you run the above code in Scite? Please post that information here. @MRAJ Did you miss this portion of my post? P.S. Please use the Code button (<> in the toolbar) when posting code Latest Webdriver UDF Release Webdriver Wiki FAQs
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 You mean to say after compiling down below where it shows any compilation error..is that what you mean by Output panel or any other place as i am not aware of that.
Earthshine Posted May 9, 2018 Posted May 9, 2018 that's the console output panel in the editor. yes My resources are limited. You must ask the right questions
Danp2 Posted May 9, 2018 Posted May 9, 2018 When you press F5 to run your script, the output panel will show any errors. FYI, you can press F8 to toggle the panel visibility. Latest Webdriver UDF Release Webdriver Wiki FAQs
MRAJ Posted May 9, 2018 Author Posted May 9, 2018 >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Desktop\BusinessObjects31.au3" --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (IconImg_Txt_btnListing) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType --> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (ListingURE_listColumn_9_0_3) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType >Exit code: 0 Time: 53.97
Danp2 Posted May 9, 2018 Posted May 9, 2018 @MRAJ This information is important to solving the problem at hand. Next time, please include it in your initial post. The call to _IEGetObjById is returning an error ($_IESTATUS_NoMatch). You will need to figure out why this is occurring. A couple of questions -- Does this application running directly in the IE browser? I ask this because your use of WinWait, ControlClick, Send, etc is atypical when dealing with a browser window Does the webpage use frames? Latest Webdriver UDF Release Webdriver Wiki FAQs
MRAJ Posted May 10, 2018 Author Posted May 10, 2018 Yes..this application is running directly in IE browser Yes it uses frames
Danp2 Posted May 10, 2018 Posted May 10, 2018 Ok... then you have to take that into account when writing your script. Assuming a single frame, then you could try the following -- $oFrame = _IEFrameGetCollection($oIE, 0) $oSpan = _IEGetObjById($oFrame, "IconImg_Txt_btnListing") _IEAction($oSpan, "click") Latest Webdriver UDF Release Webdriver Wiki FAQs
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