Docker

Docker Basic Commands

Basic
: docker version
: docker -v
: docker infod
: docker –help
: docker login
————————————
Images
: docker images
: docker pull
: docker rmi
————————————
Containers
: docker ps
: docker run
: docker start
: docker stop
————————————
System
: docker stats
: docker system df
: docker system prune

Docker Commands to download ubuntu image and then start, stop it :
1. docker login
Username: …
Password: …
(Enter your DockerHub username and password)
2. Docker run ubuntu (It will install the ubuntu image)
Or
docker pull ubuntu
Or (with version)
docker pull ubuntu:18.04
3. Docker run —-name=MyUbuntu -it ubuntu bash(It will start the image). Type ls to see ubuntu folders
4. Open another terminal and type “docker ps”
5. Copy the ubuntu container ID e.g. “a3513826aaba”
6. docker start a3513826aaba or docker stop a3513826aaba

Write a program to add wait for load the page in selenium

— Below is the program. Add it into the @before hook to make sure everytime a new scenario run it will be executed.
— Add it where the new page will be loaded using any action performed.

I hope it will be helpful.

How to read JSON file in Java

If you are using Java maven project below are steps.

1. Open pom.xml file and add below dependencies.

2. Create a java class and use below code

3. Run the Java class.