javascript - CasperJS: swallows special keys like Enter? -


I am trying to write a test using CasperJS for a scenario where the entry of the page Is the trigger for

  Casper. Start ('http: // localhost: 3000 / input-demo', function () {this.SendKeys ('# demo-input', 'demo text'); this.sendKeys ('# demo-input', '\ UE007 '); this.test.assertEquals (this .html (' # step '),' input demo ');}); Casper.run ();  

(We run it as casperjs test-js as test.js )

I have verified that the Receiving text in sendKeys input, but that text never appears in the #stage element, a "vanilla" fonts of Compass Works, the JS implementation is fine, where Webpage. SendEvent ('keypress', '\ uE007') puts on-page event handlers in the fire. Looking at the source of casper.sendKeys , I think that it is handing over the < sendEvent to the Fontworks instance of the Casper instance (i.e.).

Any thoughts? Any of these keys to work in the CasparJS exam?

Call to send {keepFocus: true} first to you. If you see the source code without adding focus, then this text is blurring the area and this means that your second dispatch card will not accept the call keypace.

It seems to work.

  casper.start ('http: // localhost: 3000 / input-demo', function () {this.sendKeys ('# demo-input', 'demo text', {keepFocus : True}); Send ('# Demo-Input', Casper page.Event.key.enter, {keepFocus: true}); this.test.assertEquals (this .html ('# Step'), 'Input Demo ')}}; Casper.run ();  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -