naru Posted April 29, 2018 Share Posted April 29, 2018 its possible to remove html element's line from internet explorer ? I want to remove these HTML Lines : <div id="imagedetail">...</div> <div id="productdetail">...</div> Link to comment Share on other sites More sharing options...
alienclone Posted April 29, 2018 Share Posted April 29, 2018 i found a post with information that my help you... https://www.autoitscript.com/forum/topic/193570-how-to-remove-duplicate-html-from-internet-explorer/ If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version Link to comment Share on other sites More sharing options...
TheDcoder Posted April 29, 2018 Share Posted April 29, 2018 ; Maybe try this: _IEAction($oHtmlElement, "delete") EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
naru Posted April 29, 2018 Author Share Posted April 29, 2018 1 hour ago, TheDcoder said: ; Maybe try this: _IEAction($oHtmlElement, "delete") @TheDcoder $oHtmlElement = ? Link to comment Share on other sites More sharing options...
TheDcoder Posted April 29, 2018 Share Posted April 29, 2018 (edited) $oHtmlElement = _IEGetObjById($oIE, "Element's ID Here") ; Not all HTML Elements have IDs, so you will have to find another way to target your desired elements Edited April 29, 2018 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
naru Posted April 29, 2018 Author Share Posted April 29, 2018 2 hours ago, TheDcoder said: $oHtmlElement = _IEGetObjById($oIE, "Element's ID Here") ; Not all HTML Elements have IDs, so you will have to find another way to target your desired elements @TheDcoder it was not working Link to comment Share on other sites More sharing options...
Danp2 Posted April 29, 2018 Share Posted April 29, 2018 _IEAction won't help in this scenario. You could try something like this (untested) -- $oElement = _IEGetObjById($oIE, "imagedetail") $oElement.RemoveNode(True) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
naru Posted April 29, 2018 Author Share Posted April 29, 2018 1 hour ago, Danp2 said: _IEAction won't help in this scenario. You could try something like this (untested) -- $oElement = _IEGetObjById($oIE, "imagedetail") $oElement.RemoveNode(True) Thanks @Danp2 But, i want to remove second line, i have two same line with 'imagedetail' id and i want to remove second line, not first. its Possible? Link to comment Share on other sites More sharing options...
Danp2 Posted April 29, 2018 Share Posted April 29, 2018 19 minutes ago, Nareshm said: But, i want to remove second line Would have been nice if you gave this information in your initial post. Use _IETagNameGetCollection to get a collection containing the desired elements. Then loop through this collection until you locate the desired element. Then attempt to remove that node. Give it a try and let us know how it goes. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
naru Posted April 29, 2018 Author Share Posted April 29, 2018 36 minutes ago, Danp2 said: Would have been nice if you gave this information in your initial post. Use _IETagNameGetCollection to get a collection containing the desired elements. Then loop through this collection until you locate the desired element. Then attempt to remove that node. Give it a try and let us know how it goes. @Danp2 But, How it will delete only second line? Link to comment Share on other sites More sharing options...
Danp2 Posted April 29, 2018 Share Posted April 29, 2018 @Nareshm This isn't a forum where you can show up, make a request, and then expect someone to regurgitate some code for you. I gave you some hints in an attempt to point you in the right direction. There's lots of code posted on this forum that deals with _IETagNameGetCollection and traversing the collection of elements. There's also the help file examples. You need to make some effort to solve your own problem. Where is your code? Post it here even if it doesn't work. At least show us that you are making an attempt to implement a solution. TheXman 1 Latest Webdriver UDF Release Webdriver Wiki FAQs 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