Jump to content

javascript menu automation help - _FFCmd


Recommended Posts

Hello,

I'm looking for some direction with how to automate the exporting of an excel report through a javascript driven menu; unfortunately it does not support IE, so Firefox is what i've been trying, and I can navigate all the way through the dashboard and generate the report, but to export it I need to go through the menu. The menu has onmousedown and onmouseover events that I'm not sure how to send. It looks like I can do this with _FFCmd, but it may take several statements.. can someone help me get started?

 

This is the path to export:

 

<div id="mstr395" tstid="" class="mstrmojo-ListBase mstrmojo-ui-Menu unselectable mojo-theme-dark visible" style="top: 0px; right: 100%; bottom: auto; left: auto;"
onclick="mstrmojo.dom.captureDomEvent('mstr395','click', self, event)"
ondblclick="mstrmojo.dom.captureDomEvent('mstr395','dblclick', self, event)"
onmousedown="mstrmojo.dom.captureDomEvent('mstr395','mousedown', self, event)"
onmouseover="mstrmojo.dom.captureDomEvent('mstr395','mouseover', self, event)"
onmouseout="mstrmojo.dom.captureDomEvent('mstr395','mouseout', self, event)"
oncontextmenu="mstrmojo.dom.captureDomEvent('mstr395','contextmenu', self, event)">

<div class="mstrmojo-ui-Menu-item-container" style="">
<a class="item exportToExcel mstrmojo-ui-Menu-item" idx="0" style="" title="">
<div class="micn"></div>Excel</a><a class="item exportToPDF mstrmojo-ui-Menu-item" idx="1" style="" title="">

 

Sorry I cannot provide access to the dashboard as it has sensitive information. Any feedback is greatly appreciated!

 

 

 

 

 

Link to comment
Share on other sites

Interesting... it's finding the Xpath, but the onclick syntax does not appear to be correct:

 

    $oDiv = _FFXPath("//DIV[@class='icn']")
    _FFCmd("FFau3.xpath.onclick()")

 

logs:

__FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("//DIV[@class='icn']",FFau3.WCD,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;}catch(e){'_FFXPath_Error: '+e;};
__FFRecv: [object HTMLDivElement] - {align: "", click: function() {...}, focus: function() {...}, blur: function() {...}, title: "", lang: "", dir: "", ...}
__FFSend: try{FFau3.xpath.onclick()}catch(e){'_FFCmd_Err';};

 

 

 

Link to comment
Share on other sites

 

Thanks so much for your help Danp2!

Unfortunately that was the last statement in the log provided by FF. I have not had any more time to play around since then, but I have a few more ideas.

Would you happen to know if/what any common terminology might be that I can use to investigate what I am trying to learn?

 

 

Link to comment
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
 Share

×
×
  • Create New...