Nightwatch: Clear fields before setValue

Created on 6 Apr 2015  路  2Comments  路  Source: nightwatchjs/nightwatch

The issue I am seeing with setValue is that it will append text and basically simply map to the send_keys selenium api call. The #selenium guys effectively call field.clear before field.sendKeys with their enter_text function. I am wondering if this is how NW setValue should work.

Also suggested, the simplest way to achieve this could be to send _Ctrl-A_ prior to the replacement value.

All 2 comments

Yes, this is intended behaviour

So how exaxtly does one clear a field prior to applying setValue?

Nevermind: use clearValue() as documented here: http://nightwatchjs.org/api/clearValue.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sgleonardoopitz picture sgleonardoopitz  路  3Comments

manjero picture manjero  路  4Comments

willli666 picture willli666  路  3Comments

t00f picture t00f  路  3Comments

danielbentov picture danielbentov  路  4Comments