cycle4passion

DOM GetElementByText

Apr 21st, 2017
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GetElementByText(wb, "COMPOSE")
  2. Return
  3.  
  4. GetElementByText(text, wb, tagName = "div") {
  5.     elements := wb.document.All.GetElementsByTagName(tagName)
  6.     Loop % elements.length {
  7.         if (elements[A_Index - 1].innerText = text) {
  8.             return wb.element[A_Index - 1]
  9.         }
  10.     }
  11. return
  12. }
Add Comment
Please, Sign In to add comment