LinkedInAttic / venus.js

where bugs go to die
http://venusjs.readthedocs.io/en/latest/
Other
298 stars 44 forks source link

[Request] Add way to make API calls to Phantom #345

Open whastings opened 9 years ago

whastings commented 9 years ago

It would be awesome if there was a way to make some calls to Phantom's api before specs are run with it.

As a use case example, I have some tests that require scrolling the window, and I can't run them because Phantom by default just grows the window's height to be the height of the whole document, never adding a scroll bar. But if I had access to Phantom's page.viewportSize property, I could set it to what I need before running the tests.

rbakr commented 9 years ago

Hi @whastings, I believe we spoke offline about this issue, is it ok for me to close? (I believe you ended up stubbing that value).

whastings commented 9 years ago

I still think it would be a cool feature, but sure.

bradcypert commented 9 years ago

@whastings Just out of curiosity, how would you expect to interact with Phantom from a Venus test?

That is, can you give a syntax example of what you'd expect to write?