Jump to content
MRAJ

click on Document List in SAP Businessobject Infoview

Recommended Posts

MRAJ

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.SAP.png.7f912bc701646014385bf3d3c2e5be21.png

Share this post


Link to post
Share on other sites
MRAJ

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.SAP.png.7f912bc701646014385bf3d3c2e5be21.png

Share this post


Link to post
Share on other sites
MRAJ

$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.

Share this post


Link to post
Share on other sites
MRAJ

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

Share this post


Link to post
Share on other sites
MRAJ

i tried with innertext too but no success.

Share this post


Link to post
Share on other sites
Danp2

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")

 

Share this post


Link to post
Share on other sites
MRAJ

i tired the below script but it is not clicking still.

 

$oSpan = _IEGetObjById($oIE, "IconImg_Txt_btnListing")
_IEAction($oSpan, "click")

Share this post


Link to post
Share on other sites
Danp2

@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.

Share this post


Link to post
Share on other sites
MRAJ

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")

Share this post


Link to post
Share on other sites
Danp2
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

Share this post


Link to post
Share on other sites
MRAJ

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.

Share this post


Link to post
Share on other sites
Earthshine

that's the console output panel in the editor. yes


My resources are limited. You must ask the right questions

 

Share this post


Link to post
Share on other sites
Danp2

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.

Share this post


Link to post
Share on other sites
MRAJ

>"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
 

Share this post


Link to post
Share on other sites
Danp2

@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?

Share this post


Link to post
Share on other sites
MRAJ

Yes..this application is running directly in IE browser

Yes it uses framesimage.png.db883a1084e6ad7aef42dd353bd7aaef.pngimage.png.db883a1084e6ad7aef42dd353bd7aaef.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×