If you have more than two network cards on your machine and you would like to pick which one you would like to use with Apache HttpClient 4 then this guide will show you how to achieve it. We can set which NIC to use by constructing a RequestConfig object. Here is an example below …
If you would like to keep your variables’ values separate from different threads and would also like to access the variables without having to pass them as parameters then a good way would be to use the ThreadLocal. ThreadLocal is used for thread-local variables. Here is an example on how to use it. Create the …
The instructions below are for Debian, but with Ubuntu you would also need to use ‘sudo’ if you are not running as root First you need to install Java, if you have not already. This page has instructions on how to install Java 1.8 using apt-get Installing Oracle Java 8 on Debian/Ubuntu Now let’s get …
Create the following file add the following line to it and then to install it simply run the following
Here are the dependencies you will need to use Selenium and PhantomJS with Maven. and in your code call the following WebDriverManager downloads the latest version of the required PhantomJS binary to be used with Selenium WebDriver.
For some time I was using imapx, but sometimes it throws exceptions. I’ve checked their site and other people are having the same problem with no solution. So afterlooking for another imap library I found the ones below to work the best MailSystem.NET MailKit
If you want to kill all processes with a matching name, there is a command for that. pkill -f accepts a regular expression pattern as a parameter.
When using PhantomJS visa GhostDriver with Selenium, you will get all kinds of log messages which would not be necessary in some instances. The example below shows how to disable these log messages.
The example below shows how you can configure PhantomJS to use proxies with your web testing.
The following applies if you are running a console based multi-threaded Java application. You can get a full stack dump by pressing the following keys on your keyboard. Ctrl+Break