damilien Posted October 11, 2018 Share Posted October 11, 2018 Hello everyone, I would like to click on this button on a web page but I can't find the right function. 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 More sharing options...
Danp2 Posted October 11, 2018 Share Posted October 11, 2018 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? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
damilien Posted October 12, 2018 Author Share Posted October 12, 2018 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 More sharing options...
Juvigy Posted October 12, 2018 Share Posted October 12, 2018 Can you get to the TR object above the DIV object using ? $oRow = _IEGetObjById($oIE, 'b-data-table-network-link-new') Link to comment Share on other sites More sharing options...
damilien Posted October 12, 2018 Author Share Posted October 12, 2018 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 More sharing options...
Juvigy Posted October 12, 2018 Share Posted October 12, 2018 Your code should be: Do you see html tags in the msgbox? $oRow = _IEGetObjById($oIE, 'b-data-table-network-link-new') MsgBox(0,0,$oRow.innerhtml) Link to comment Share on other sites More sharing options...
Danp2 Posted October 12, 2018 Share Posted October 12, 2018 6 hours ago, damilien said: I tried your code but it doesn't work That type of response doesn't help us to help you. What specifically didn't work? Show us the results from the Scite output panel from when you ran the code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
damilien Posted October 12, 2018 Author Share Posted October 12, 2018 Hi, Finally, I found the solution. $oSubmitClick = _IEGetObjById($oIE,"b-data-table-network-link-new") _IEAction($oSubmitClick, "click") _IELoadWait($oIE,2000) Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now