kavya s
kavya s

Reputation: 19

how to pass Excel file name via command line to pytest

I am running my automation scripts on 2 portals(STAGE AJS, STAGE IAM). So I have stored those portal URL and credentials in a .xlsx file and I am using the .env file where I am reading the filepath.

**.env file**
#Stage environment
filepath = "ExcelFiles/StageAJSDataSource.xlsx"
#filepath = "ExcelFiles/StageIAMDataSource.xlsx"

Everytime when I run the pytest, I have to manually uncomment the filepath in the .env file to choose the excel file. can I pass this filepath in command line and run only on particular portal? Please suggest me.

Upvotes: 0

Views: 20

Answers (0)

Related Questions