Jump to content
Sign in to follow this  
damilien

Click on button with <button name="ok">

Recommended Posts

Hi Everyone,

 
I need to click on this OK button but for now I can not do it

image.png.b25c34d35b3e653b2a6e3a5709ebd9e1.png

image.png.88f641902f2f02823e4b27829819bd16.png

As for my previous post, I tried several codes of this forum but nothing works for now.

$oSubmitClick = _IEGetObjById($oIE,"b-modal-dialog-buttons")
_IEAction($oSubmitClick, "click")
_IELoadWait($oIE,2000)

Is there a function based on the button name?

I thank you in advance for your help.

Share this post


Link to post
Share on other sites
2 minutes ago, damilien said:

$oSubmitClick = _IEGetObjById($oIE,"b-modal-dialog-buttons")

As the function name should suggest, it gets the object by its ID.
Since you have only the class name, you should use something like this :)
 


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
22 hours ago, FrancescoDiMuro said:

As the function name should suggest, it gets the object by its ID.
Since you have only the class name, you should use something like this :)
 

It works. Thank you
 

Local $oBtns = _IETagNameGetCollection($oIE, "button")
For $oBtn In $oBtns
    If String($oBtn.classname) = "b-button" Then
      _IEAction($oBtn, "click")
   EndIf
Next

 

Share this post


Link to post
Share on other sites

Happy to have helped :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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...