jmp Posted November 24, 2019 Posted November 24, 2019 How can i click on (Pop Up) button that was based on title or class ? <button title="close" class="close" type="button" data-dismiss="modal">×</button> <button class="btn btn-default" type="button" data-dismiss="modal">Close</button>
Nine Posted November 24, 2019 Posted November 24, 2019 What have you tried ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
jmp Posted November 24, 2019 Author Posted November 24, 2019 9 minutes ago, Nine said: What have you tried ? @Nine I am trying to get table from ie but when i go to homepage i get popup box, i want to close it (make fully automatic) and continue my script.
Developers Jos Posted November 24, 2019 Developers Posted November 24, 2019 The question is NOT "what you are trying to accomplish" but rather "What have you tried yourself that is not working?" In other words: Stop dumping requests for getting others to code for you and show your efforts first! (pretty sure this is not the first time this is said to you...right?) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jmp Posted November 24, 2019 Author Posted November 24, 2019 38 minutes ago, Jos said: The question is NOT "what you are trying to accomplish" but rather "What have you tried yourself that is not working?" In other words: Stop dumping requests for getting others to code for you and show your efforts first! (pretty sure this is not the first time this is said to you...right?) Jos @Jos @Nine I am tried with this code : <button class="btn btn-default" type="button" data-dismiss="modal">Close</button> #include <IE.au3> $oIE = _IEAttach ("Edu") clickobjbyclass($oIE, 'btn btn-default') Func clickobjbyclass(ByRef $oIE, $class) $tags = $oIE.document.GetElementsByTagName('button') For $tag In $tags $class = $tag.GetAttribute('class') If String($class) = $class Then Return _IEAction($tag, 'click') EndIf Next Return False EndFunc #include <IE.au3> $oIE = _IEAttach ("Edu") _IELinkClickByText($oIE, "Close")
Developers Jos Posted November 24, 2019 Developers Posted November 24, 2019 Great, but don't think your posted script is runnable for us and replicating your issue, so how are we supposed to assist you when we can't see the Webpage source? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jmp Posted November 24, 2019 Author Posted November 24, 2019 8 minutes ago, Jos said: Great, but don't think your posted script is runnable for us and replicating your issue, so how are we supposed to assist you when we can't see the Webpage source? This webpage need my username and password, without username and password it can't be accessed.
Developers Jos Posted November 24, 2019 Developers Posted November 24, 2019 So the question remains how we are supposed to help you when we do not know the HTML source for that page? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jmp Posted November 24, 2019 Author Posted November 24, 2019 22 minutes ago, Jos said: So the question remains how we are supposed to help you when we do not know the HTML source for that page? <button class="btn btn-default" type="button" data-dismiss="modal">Close</button> <button title="close" class="close" type="button" data-dismiss="modal">×</button>
Developers Jos Posted November 24, 2019 Developers Posted November 24, 2019 Déjà vu Honestly can't be bothered anymore with your questions when you aren't willing to provide a proper reproducer. Maybe other are willing to keep on stabbing in the dark. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Danp2 Posted November 24, 2019 Posted November 24, 2019 @jmp The code for clickobjbyclass (which I'm guessing you copied from elsewhere on the forum) has a flaw in it where the class parameter is being overwritten. There are other working examples on the forum if you search for them. Latest Webdriver UDF Release Webdriver Wiki FAQs
jmp Posted November 25, 2019 Author Posted November 25, 2019 18 hours ago, Danp2 said: @jmp The code for clickobjbyclass (which I'm guessing you copied from elsewhere on the forum) has a flaw in it where the class parameter is being overwritten. There are other working examples on the forum if you search for them. @Danp2 i am tried also with this code : #include <IE.au3> $oIE = _IEAttach ("Edu") Local $iCloses = _IETagNameGetCollection($oIE, "button") For $iClose In $iCloses If String($iClose.innertext) = "Close" Then MsgBox(0, "", "Found") _IEAction($iClose, "click") EndIf Next I am get msgbox but not click on Close button.
Danp2 Posted November 25, 2019 Posted November 25, 2019 As @Jos stated, you can't expect us to debug your code for you when you don't provide enough details (ie: page's full HTML source). Either you are clicking the wrong button (did you check to see if there are frames associated with the popup?) or the click isn't triggering the underlying javascript event(s). Either way, only way to solve the problem is for you to do some actual investigating / debugging on your end. Latest Webdriver UDF Release Webdriver Wiki FAQs
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