1

I have downloaded a C# Page Object project from Github from the following location: https://github.com/PaulSodimu

The program uses an app.config file to identify the page objects to load.

What I'd like to do is this: Configure the app.config file to parameterize the test environment. Currently, when I want to change the test environment, I do a search and replace of each url string in the app.config file until all URLs point to the appropriate test environment. Instead, I'd like to have a parameter that I can set that points to the appropriate test environment.

Sample of the app.config file below

Thanks in Advance

<configuration>
  <configSections>
    <section name="Environments" type="NASOnline_TestFramework.Setup.EnvironmentsDataSection, NASOnline_TestFramework" />
  </configSections>

 <Environments>
    <!--STAGE-->
    <Environment>
      <add name="LoginPage" url="https://svcrel.wn.nasinsurance.com" pageTitle="NAS Insurance Services, Inc." />

      <!--Service Center Pages-->

      <add name="LandingPage" url="https://svcrel.wn.nasinsurance.com/index.php?c=home.updates" pageTitle="NAS Insurance Services, Inc." />
      <add name="ApplicationsPage" url="https://svcrel.wn.nasinsurance.com/index.php?c=app_list.list" pageTitle="NAS Insurance Services, Inc." />
      <add name="PoliciesPage" url="https://svcrel.wn.nasinsurance.com/index.php?c=policy_list.list" pageTitle="NAS Insurance Services, Inc." />
      <add name="ClientsPage" url="https://svcrel.wn.nasinsurance.com/index.php?c=insured_list.list" pageTitle="NAS Insurance Services, Inc." />
Kenito
  • 53
  • 2
  • 10

0 Answers0