Snippets of the day – Friday, February 14, 2014

Posted on Posted in Snippets

code-snippet-2

Here are some of the most recently published snippets!

Linux one liner bash code to detect file or directory from a given list

This bash code shows how to detect if a given item in a list returned by a command is actually a file or a directory, without affecting the output format.

In this case, xargs is used to pass the ‘{}’ reference to a shell script executed for each line returned by the tree command.

Open the snippet

Author:    lbottaro

Disable “close” button on form

Just add this code in a form class to disable the close button on the top right

Open the snippet

Author:    MatteoP

Dalekjs – Define a simple functions file

This file contains a sample of utility functions you can import in your web automation test file, using dalekjs testing tool.

You can specify the argument to pass to the method: here the ‘domain’ argument is used into the method.

More info about dalekjs tool here
Site: dalekjs.com

Open the snippet

Author:    lbottaro

Leave a Reply

Your email address will not be published. Required fields are marked *