Jump to content

Click a button in a div class


 Share

Recommended Posts

Hello everyone,

I would like to click on this button on a web page but I can't find the right function.

image.thumb.png.723c461298baa16c61f691e5f6e4ad31.png

image.png.34cd56eb87ce01544bf985791172bd08.png

 

Here is my code :

$oDivs = _IETagNameGetCollection($oFrame, "div")
For $oDiv In $oDivs
  If StringInStr(oDiv.classname, "b-data-table-header-link") and $oDiv.innertext = "Créer" Then
     _IEAction($oDiv, "click")
  EndIf
Next

I tried several codes of this forum but nothing works for now.

I thank you in advance for your help.

 

 

Link to comment
Share on other sites

10 hours ago, Danp2 said:

I was going to suggest the following --

$oRow = _IEGetObjById($oIE, 'b-data-table-network-link-new')
$oDiv = _IETagNameGetCollection($oRow, "div", 0)

but then I saw where you were using $oFrame. Where does this object come from? Are there frames involved with this web site?

Hi,

No it was an error of me :

$oDivs = _IETagNameGetCollection($oIE, "div")
For $oDiv In $oDivs
  If StringInStr(oDiv.classname, "b-data-table-header-link") and $oDiv.innertext = "Créer" Then
     _IEAction($oDiv, "click")
  EndIf
Next

I tried your code but it doesn't work

Thanks.

Link to comment
Share on other sites

1 hour ago, Juvigy said:

Can you get to the TR object above the DIV object using ?

$oRow = _IEGetObjById($oIE, 'b-data-table-network-link-new')

 

Hi,

Here is my code :

$oTrs = _IETagNameGetCollection($oIE, "TR")
For $oTr In $oTrs
  If StringInStr($oTr.id, "b-data-table-network-link-new") Then
     MsgBox("OK")
  EndIf
Next

My msgbox is never displayed.

 

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...