need to double click HTML table cell (fireevent?)

bobkuhn

New Member
Joined
Nov 1, 2011
Messages
22
The original posting is confusing, asked multiple questions and hasn't generated any ideas/suggestions so ....

Let's ask my question a different way.

I'm trying to automate IE and have run into a MAJOR snag. Any ideas/suggestions would be appreciated

I need to double click a cell in an HTML table.

I'm pretty sure I have the correct cell since the following always reports the expected data.
Code:
 temp = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).outerText

One of the methods I've run across is to use the FIREEVENT method. Despite returning TRUE I haven't seen any change to the IE window when I tried the following code. A single click will highlight the cell and a double click will open a drop down menu.

Code:
         temp1 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n m o u s e o v e r")  ' returns true but nothing happens
         temp2 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmousedown")  ' returns true but nothing happens
         temp3 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmouseup")  ' returns true but nothing happens
         temp4 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n c l i c k")  ' returns true but nothing happens – must have *********** or will return false
         temp5 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmouseup")  ' returns true but nothing happens
         temp6 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("ondblclick")  ' returns false

         temp1 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n m o u s e o v e r")  ' returns true but nothing happens
         temp2 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmousedown")  ' returns true but nothing happens
         temp3 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmouseup")  ' returns true but nothing happens
         temp4 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n c l i c k")  ' returns true but nothing happens – must have *********** or will return false
         temp5 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n c l i c k")  ' returns true but nothing happens


         temp1 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n m o u s e o v e r")  ' returns true but nothing happens
         temp6 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("ondblclick")  ' returns false


         temp1 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("o n m o u s e o v e r")  ' returns true but nothing happens
         temp2 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmousedown")  ' returns true but nothing happens
         temp3 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmouseup")    ' returns true but nothing happens
         temp4 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmousedown")  ' returns true but nothing happens
         temp5 = oWin.document.all.tags("Table").Item(4).Rows(1).Cells(4).FireEvent("onmouseup")    ' returns true but nothing happens

The HTML code for the table events is (I've re-arranged it for easier reading":
HTML:
       o n m o u s e o v e r="return Grids[0].GridMouseOver(event)"
     onmousedown="return Grids[0].GridMouseDown(event)"
     onmouseup="return Grids[0].GridMouseUp(event)"
     onmousemove="return Grids[0].GridMouseMove(event)"
     o n c l i c k="return Grids[0].GridClick(event)"
     ondblclick="return Grids[0].GridDblClick(event)"
     onselectstart="return Grids[0].GridSelectStart(event)"
     oncontextmenu="return Grids[0].GridRightClick(event)" cellSpacing="0" cellPadding="0">

Bob

PS – If you want to see more of the HTML then I need help:
1) how to get around the "***" issue when posting (other than adding spaces to thetext that was stepped on)
2) how to capture the HTML in an easy to read format<table class="GMMainTable" id="RPT_WIZARD_TABLE_GRID"
</table>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try .Focus on the element, followed by .FireEvent "onmousedown" and .FireEvent "ondblclick".
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,542
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top