Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
108 stars 24 forks source link

Extend _WD_ElementActionEx() by a remove option #416

Closed sven-seyfert closed 1 year ago

sven-seyfert commented 1 year ago

What

I would like to extend _WD_ElementActionEx() by the command 'remove'.

Why

Because there was a forum question/requirement to remove an element of the DOM.

What would the changes look like

I guess it's quite simple and it would be similar to:

    Case 'hide'
        $iActionType = 2
        $sJavaScript = "arguments[0].style='display: none'; return true;"

Actually this:

    Case 'remove'
        $iActionType = 2
        $sJavaScript = "arguments[0].remove();"

Questions

Best regards Sven

Danp2 commented 1 year ago

Yes, you can submit a PR. Just update the one source file. I can handle the others.

Danp2 commented 1 year ago

P.S. You don't need my permission to submit a PR for review. That's why this code is hosted here in the first place. 😉