Autofill data for mybenefits using selenium webdriver
- Eclipse IDE
- Java
- Microsoft Excel
- Git Version-Control - To use git CLI commands (Personally, I prefer to use this instead of EGit from Eclipse)
-
Clone this repo
-
Run Eclipse and click the following
Package-->Import Project
(Or just clickImport existing projects
on welcome page), thenGeneral-->Existing project into workspace
-
Set as UTF-8 in Eclipse by going to
Preferences-->General-->Workspace
and selectUTF-8
as the Text File Encoding. This should set the encoding for all the resources in your workspace. Any components you create from now on using the default encoding should all match. -
on Package Explorer tab, right click
pom.xml
and clickMaven-->Update Project...
then clickOK
to update all packages(errors will disappear from console) -
Download 2 required files from GitHub releases
mybenefits_data.xls
andwebdriver_setup.exe
,Readme-setup.docx
(Optional for Hebrew readers) and place anywhere you want. -
Run webdriver_setup.exe (Only works in Windows and it's safe) and wait for it to finish installation chromedriver in few moments
-
Open Eclipse project where you cloned "autofill-mybenefits-java" and redirect to
\testeclipsegit\autofill-mybenefits-java\src\test\java\pages_oop\BaseDriver.java
and change code in line 11:System.setProperty("webdriver.chrome.driver","\old_path_to_your\\chromedriver.exe");
to your location of chromedriver like thisSystem.setProperty("webdriver.chrome.driver","\new_path_to_your\\chromedriver.exe");
-
then redirect to
\autofill-mybenefits-java\src\test\java\test_case\Setup_Data_Demo.java
, then change code in line 33 to your saved location of excel file -
Finally, redirect to
\autofill-mybenefits-java\src\test\java\test_case\
and right clickSetup_Data_Demo.java
then run and enjoy automating fill in data that read from excel file (you can change data only in orange column D2 to D25 from title "Value")
NOTE: If for some reason Eclipse unable to run/debug
Setup_Data_Demo.java
or giving different errors, end all duplicates if found chromedriver.exe from Task Manager (Windows)