firefox - javascript / selenium: get the window from the document object -


I am writing user extensions for selenium. I have document How can I get the window of the window?

Post-text "itemprop =" text ">

This document.parentWindow is in IE; This is document.defaultView in Mozilla.

In this way you can do something like

  function getDocWindow (doc) {return doc.parentWindow || Doc.defaultView; }  

Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

objective c - iPhone and it's wireless area -