Clicking a button within an IE table

Suraj Khosla

I am trying to click a button within a table on a webpage within IE, the source of the button shows:

<input type="image" src="img/testimg.png" onclick="picture_return(this,'92b84574a336a090618f151b6fc821cf:5','http://testwebpage.com/in/834');" value="Test Web Button">

This is a part of a large table with multiple <td> within the source, this is within another table which is then within the following class:

<div class="section_client_dnBox">

I tried to go through a few of the items within the class by using the following VBA code:

IE.Document.getElementsByClassName("section_client_dnBox")(0).Click

However, had no luck as (0) didn't press anything and anything larger ie, (1) gave me an error. So my question now is basically, is there any way of clicking the button using something simple such as reffering to it's value within the table (value="Test Web Button")?

Thomas Beck Sutton

From my experience, you need to look at the tag name rather than the class name. This is an example of the code I generally use when finding buttons.

For Each MyHTML_Element In document.getElementsByTagName("input")
     If MyHTML_Element.Type = "submit" Then
         MyHTML_Element.Click: Exit For
     End If
Next

You might be able to change the . type to = "image". I too am just learning how to use IE automation in VBA so I am not a champ at it either. I hope that helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

VBA Clicking Button on IE

From Dev

excel vba IE clicking a button

From Dev

Show table by clicking a button

From Dev

Clicking on an unselectable td within a table

From Dev

Changing the bindings of a Table by clicking on a button

From Dev

clicking a button inside table view

From Dev

Clicking a button within a JFrame passes an data to a JPanel

From Dev

Select project when clicking in a button within an ExpandableListView

From Dev

Clicking button within span with no ID using Selenium

From Dev

Bug in IE retrieving get variable within button?

From Dev

Get the model when clicking a button on a table row

From Dev

Adding new rows to table on clicking button in JQuery

From Dev

Get the model when clicking a button on a table row

From Dev

Changing JSON file loaded into table by clicking button

From Dev

Showing hidden table after clicking submit button

From Dev

jQueryUI dialog scrolls to top when clicking close button in IE

From Dev

jQueryUI dialog scrolls to top when clicking close button in IE

From Dev

clicking button within iframe > hide div in parent window

From Dev

Clicking on a button with attribute role within div tag using Selenium

From Dev

clicking button within iframe > hide div in parent window

From Dev

Finding the correct child view of ListView while clicking a button within it

From Dev

clicking button within UITableview cell gives wrong result while search

From Dev

How to make a show a table on clicking a button defined in <button> using jquery

From Dev

Parse HTML table after clicking a button to make it visible

From Dev

Select first 5 checkbox from a table by clicking on a button

From Dev

Delete mysql Table row by clicking submit button php

From Dev

Selenium WebDriver: clicking a visible button inside a row of a table

From Dev

How to delete rows from table when clicking button

From Dev

Parse HTML table after clicking a button to make it visible

Related Related

  1. 1

    VBA Clicking Button on IE

  2. 2

    excel vba IE clicking a button

  3. 3

    Show table by clicking a button

  4. 4

    Clicking on an unselectable td within a table

  5. 5

    Changing the bindings of a Table by clicking on a button

  6. 6

    clicking a button inside table view

  7. 7

    Clicking a button within a JFrame passes an data to a JPanel

  8. 8

    Select project when clicking in a button within an ExpandableListView

  9. 9

    Clicking button within span with no ID using Selenium

  10. 10

    Bug in IE retrieving get variable within button?

  11. 11

    Get the model when clicking a button on a table row

  12. 12

    Adding new rows to table on clicking button in JQuery

  13. 13

    Get the model when clicking a button on a table row

  14. 14

    Changing JSON file loaded into table by clicking button

  15. 15

    Showing hidden table after clicking submit button

  16. 16

    jQueryUI dialog scrolls to top when clicking close button in IE

  17. 17

    jQueryUI dialog scrolls to top when clicking close button in IE

  18. 18

    clicking button within iframe > hide div in parent window

  19. 19

    Clicking on a button with attribute role within div tag using Selenium

  20. 20

    clicking button within iframe > hide div in parent window

  21. 21

    Finding the correct child view of ListView while clicking a button within it

  22. 22

    clicking button within UITableview cell gives wrong result while search

  23. 23

    How to make a show a table on clicking a button defined in <button> using jquery

  24. 24

    Parse HTML table after clicking a button to make it visible

  25. 25

    Select first 5 checkbox from a table by clicking on a button

  26. 26

    Delete mysql Table row by clicking submit button php

  27. 27

    Selenium WebDriver: clicking a visible button inside a row of a table

  28. 28

    How to delete rows from table when clicking button

  29. 29

    Parse HTML table after clicking a button to make it visible

HotTag

Archive