poltergeist


Can I monkey patch the phantomjs browser api with execute_script?


Im trying to test an application with some native JavaScript features disabled e.g. querySelector ...
So I thought this might work before the call to visit:
page.execute_script("document.querySelector = null")
but it doesn't work, any thoughts on how I could achieve this?
Cheers
John
Have a look at the :extensions option. This allows you to define a JS file which gets preloaded into the browser.

Related Links

How can I use “includeJs” function of phantomjs with poltergeist?
Poltergeist ruby gem fails to process `:shift` modifier in `send_keys`
Using Poltergiest to give user of app a screenshot of their page
Poltergeist 1.9.0 w/Ruby 1.9.3
Post via Capybara and Poltergiest for API testing
Poltergeist current_url command is returning page_info hash instead of a URL
How does one test the content of confirm dialogs using poltergeist?
Using Poltergeist, Phantom JS instances are not exiting during every rspec run
Render page element with padding in Poltergeist
Can I monkey patch the phantomjs browser api with execute_script?
send_keys support for Poltergeist?

Categories

HOME
gerrit
isabelle
relative-path
read-eval-print-loop
rsyslog
malloc
survey
echarts
networkx
swagger-ui
adfs
virtualization
medical
nano-server
dtrace
circuit
transformation
serilog
zapier
object-detection
facebook-instant-articles
sylius
bootstrap-tour
zurb-foundation-6
captiveportal
qhull
selectedindexchanged
bootstrap-material-design
assistant
flink-streaming
directx-10
functor
windows-dev-center
subset-sum
mapdb
revolution-slider
adobe-premiere
qwerty
powershell-dsc
glew
acoustics
angular-resource
network-flow
apache-fop
theming
veracode
git-diff
nstextview
forever
python-cryptography
thrust
clang-static-analyzer
freelancer.com-api
srand
wso2cloud
eclipse-clp
purge
ideamart
splash
umbraco6
csquery
jsonpickle
c3
socketexception
flask-cors
xojo
valueconverter
htmlcleaner
mysql-error-1062
android-2.2-froyo
didselectrowatindexpath
industrial
flexmojos
quantlib-swig
easy-install
ril
gwt-rpc
gridcontrol
http-unit
hamiltonian-cycle
jquery-knob
gil
javaspaces
ohm
gnu-prolog
cinema-4d
netbeans-7.1
locate
iphone-web-app
blitz++
suppress
getresponsestream
ncqrs
user-friendly
zend-tool
iweb
avatar

Resources

Encrypt Message