javascript - Browser Instrumentation -


i need mimic behavior of browser. need acess dom properties of webpage (ex. document.cookie or window.onblur etc) without loading webpage in actual browser , without interacting (ex. clicking button, putting mouse on link etc) in browser.

infact, trying thing have imaginary browser object browser. so, can :

browser g = browser.load('google.com'); g.document.cookie(); g.window.onblur(); 

i guess known 'browser instrumentation'. how can ? ideas.. ?

your best bet selenium (http://seleniumhq.org/). although use real browser (which sort of necessary if want test things in real browser environment), allow automate/control browser make whatever want. using can write code this:

# pseudo-code search selenium on google browser.open('www.google.com') browser.findelementbycss('#search').value('selenium') browser.findelementbycss('#submitbutton').click() 

which sounds trying do.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -