selenium java logging code example

Example 1: logging in with selenium

driver.get (“URL”)
driver.find_element_by_id(“ID”).send_keys(“username”)
driver.find_element_by_id (“ID”).send_keys(“password”)
driver.find_element_by_id(“submit”).click()

Example 2: logging in java

Logging is the process of writing log messages during the execution of a 
program to a central place.This logging allows you to report and persist
error and warning messages as well as info messages (e.g., runtime 
statistics) so that the messages can later be retrieved and analyzed.

Tags:

Java Example