Skip to main content

Nightwatch.js Selenium e2e test: input field clearing issue

While doing the e2e (end to end) tests for a Vue.JS frontend, I bumped into something interesting, which was really fun to fix/find a workaround for.

Firstly, for the e2e tests, I've used Nightwatch.js, which uses the Selenium API, and is written in Node.js.

The problem was that, I was not being able to clear some input tag field data using the API provided by Nightwatch -- browser.clearValue. For example:

browser.clearValue('input[type="text"]')

Read more…

Postgresql: Running `psql` as user `postgres` from different system username on localhost

Postgresql's postmaster (Postgresql cluster [not cluster in the usual notion] manager), listens on TCP socket and also on UNIX domain socket (for localhost use only). Using UNIX doamin sockets to connect to Postgresql is very useful as it is bound to filesystem access only, no network socket involved. As a result, we get less overhead and less resource usage.

Read more…

Python : Turning a sequence into an iterator without iter(), keeping the sequences' properties intact

From time to time, we have come across questions like -- How can I make an iterator out of a sequence without explicitly calling the iter() function?

A follow-up question to that would be -- Can we preserve the sequences' properties intact, with just adding the needed properties to make it an iterator?

In answering these, we are also answering the obviously inferred question -- How can I expand functionalities of a class without modifying the class itself?

Read more…

Hello, World!

The title is a must, isn't it? :)

Hello there, not sure when you are reading this, but glad you are here, reading the very first post on my blog!

Thank you very much for digging this deep into my tiny namespace on the massive web.