Jump to content
Sign in to follow this  

Tricky Java Execution problem

Recommended Posts

Hi there

I use AutoIT to automatically execute test scripts. It saves the user having to endlessly execute test scripts when we upgrade systems.

Unfortunately, I do not understand how to get AutoIT to execute embedded Java when it changes each time. My company is using SAP and accessing using the WebGUI, which means that all work is done via a browser.

Take this example.

I want the script to click the "Log off" link. It looks like a link, but isn't - it's actually Java. See below.

<a class="urLnkFunction" id="Link620d620d" ct="LN" st="" title="End the current portal session and log off" onkeydown="return (sapUrMapi_Link_activate('Link620d620d',event))"  href="#" target="" onclick="return htmlbDoEvent(this,'C','onclick','0','htmlb_14573_htmlb_3173',2,1,'',0);" >
                                                  <span class="urFontStd"><span ct="TV" class="urTxtStd" style="white-space:nowrap;"white-space:nowrap;>Log off</span></span>

As you can see, when the user clicks the Log off text it executes a Java Function Link620d620d. The problem is, that the numbers change for each and every session. So how can I possibly write code that executes it?

Here are the respective functions that the Log off link executes:

<input type="hidden" name="htmlbfrm_htmlb_14573_htmlb_3173_0" value="2;LogoffLink;2;0;HelpLink;1;0;2;@csh@.event.ButtonClickEvent;@0@;1;@csh@.Link;"><input type="hidden" id="htmlb_14573_htmlb_3173_complete" code="OK"><script defer>sapUrMapi_initLinkStatus()</script></form><script defer>function Link37a837a8_click(htmlbevent){javascript:openHelp();;}
function Link37a837a8_onclick(htmlbevent){htmlb_formid = 'htmlb_14573_htmlb_3173';javascript:openHelp();;}function Link620d620d_click(htmlbevent){javascript:openLogoffMsg();;}
function Link620d620d_onclick(htmlbevent){htmlb_formid = 'htmlb_14573_htmlb_3173';javascript:openLogoffMsg();;}var Link37a837a8= new _htmlbLink("htmlb_14573_htmlb_3173","Link37a837a8");var Link620d620d= new _htmlbLink("htmlb_14573_htmlb_3173","Link620d620d");var MessageBar33ba33ba= new _htmlbMessageBar("htmlb_14573_htmlb_3173","MessageBar33ba33ba","htmlb_14573");</script>

If anyone has any suggestions as to how to get around this, please let me know, as it has me stumped.



Edited by Clark

Share this post

Link to post
Share on other sites

Hi Clark,

Did you get a resolution to your issue? Or were you able to find a workaround to the problem?


I am facing the same issue and I have tried all that I could possibly can to activate the javascript within the Web GUI of SAP, but am not yet successful.


Any input would be deeply appreciated.


Share this post

Link to post
Share on other sites

@Priti did you happen to notice that this thread is over 5 years old, and that the OP has not even visited the forum in over a year? Rather than resurrecting an old thread (which received no responses in that 5 years), you are usually better off creating a new thread of your own. You can follow the guidelines below:

  • Detailed description of what you're trying to accomplish
  • OS/AutoIt version
  • Post the code (even if it isn't working the way you would like it to)
  • Specify what you expect, what errors you're seeing, etc.

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

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...