How to execute Javascript DOM capabilities in Java automation

1. How to open another tab and switch to it.

2. How to get the value of CSS locator from a DOM in the console

3. How to run any CSS or XPTH locator on the console using querySelector

How to get the YAML data and use it in Java

1. Create a YAML file. Below is the example

getStartedButton: getStarted_btn

phoneNumberEditText: phone_number_layout
continueButton: send_sms

android: studio

2. Download snakeyaml jar file.
3. Create a java file.

Run the program. Below is the output

Check internet connection

If you are doing automation it is possible that internet connection may get lost. For that put it in your base class in before method.