Selenium - framework- C#









up vote
0
down vote

favorite












Im pretty new to designing automation frameworks using selenium with C#.



Creating a framework using page object model and can we use the same framework for different projects/applications ? OR do we need to create a different framework for each application ( all of them are web applications).



We are thinking to use Selenium webdriver with C# and implementing it with page object model.










share|improve this question

























    up vote
    0
    down vote

    favorite












    Im pretty new to designing automation frameworks using selenium with C#.



    Creating a framework using page object model and can we use the same framework for different projects/applications ? OR do we need to create a different framework for each application ( all of them are web applications).



    We are thinking to use Selenium webdriver with C# and implementing it with page object model.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Im pretty new to designing automation frameworks using selenium with C#.



      Creating a framework using page object model and can we use the same framework for different projects/applications ? OR do we need to create a different framework for each application ( all of them are web applications).



      We are thinking to use Selenium webdriver with C# and implementing it with page object model.










      share|improve this question













      Im pretty new to designing automation frameworks using selenium with C#.



      Creating a framework using page object model and can we use the same framework for different projects/applications ? OR do we need to create a different framework for each application ( all of them are web applications).



      We are thinking to use Selenium webdriver with C# and implementing it with page object model.







      c# selenium-webdriver frameworks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 20:44









      Prp

      12




      12






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          If I am understanding you correctly using Page Object Model will result in separate frameworks because each site will have its own identifiers. It is basically making a map of the site that can be accessed by your Selenium project.



          This is how I have implemented it in the past.



          Create One Solution in Visual Studio. Then create separate Projects for each site within that one solution. Also create a common project also with things that all of the sites need to share. You can do some of your shared Selenium stuff in the common project.



          In each individual project you can either implement Page Object Model or you can add each element to your app config and reference it with the Configuration Manager. Doing this allows each site to have its own list of identifiers. If you have the developers at your disposal they can also add special ids to the fields that are used only for qa. This is valuable because they can move things all over the screen and as long as they don't change the 'qaid' of the field your list will stay current and your tests will not break. This approach takes some work from your developers to add the qaids to the elements but once it is done your tests will work a lot better. It also eliminates the need to traverse Xpaths or complex CSSSelectors.






          share|improve this answer



























            up vote
            0
            down vote













            Having all the applications/projects in the same framework is also valid.
            Our current framework handles a handful of projects including api.



            You could also go with no dedicated test repo, and just have the framework be part of the application/project it's testing.



            All architectures have pros and cons.



            Keeping all the projects in one framework will allow for easier sharing of base methods, and it helps with de-duping of logic.
            You would keep projects separate with a folder structure that mimics your setup.
            You could have a base class that instantiates the selenium driver, which is then used by other base classes pr project.






            share|improve this answer




















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233019%2fselenium-framework-c-sharp%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote













              If I am understanding you correctly using Page Object Model will result in separate frameworks because each site will have its own identifiers. It is basically making a map of the site that can be accessed by your Selenium project.



              This is how I have implemented it in the past.



              Create One Solution in Visual Studio. Then create separate Projects for each site within that one solution. Also create a common project also with things that all of the sites need to share. You can do some of your shared Selenium stuff in the common project.



              In each individual project you can either implement Page Object Model or you can add each element to your app config and reference it with the Configuration Manager. Doing this allows each site to have its own list of identifiers. If you have the developers at your disposal they can also add special ids to the fields that are used only for qa. This is valuable because they can move things all over the screen and as long as they don't change the 'qaid' of the field your list will stay current and your tests will not break. This approach takes some work from your developers to add the qaids to the elements but once it is done your tests will work a lot better. It also eliminates the need to traverse Xpaths or complex CSSSelectors.






              share|improve this answer
























                up vote
                0
                down vote













                If I am understanding you correctly using Page Object Model will result in separate frameworks because each site will have its own identifiers. It is basically making a map of the site that can be accessed by your Selenium project.



                This is how I have implemented it in the past.



                Create One Solution in Visual Studio. Then create separate Projects for each site within that one solution. Also create a common project also with things that all of the sites need to share. You can do some of your shared Selenium stuff in the common project.



                In each individual project you can either implement Page Object Model or you can add each element to your app config and reference it with the Configuration Manager. Doing this allows each site to have its own list of identifiers. If you have the developers at your disposal they can also add special ids to the fields that are used only for qa. This is valuable because they can move things all over the screen and as long as they don't change the 'qaid' of the field your list will stay current and your tests will not break. This approach takes some work from your developers to add the qaids to the elements but once it is done your tests will work a lot better. It also eliminates the need to traverse Xpaths or complex CSSSelectors.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  If I am understanding you correctly using Page Object Model will result in separate frameworks because each site will have its own identifiers. It is basically making a map of the site that can be accessed by your Selenium project.



                  This is how I have implemented it in the past.



                  Create One Solution in Visual Studio. Then create separate Projects for each site within that one solution. Also create a common project also with things that all of the sites need to share. You can do some of your shared Selenium stuff in the common project.



                  In each individual project you can either implement Page Object Model or you can add each element to your app config and reference it with the Configuration Manager. Doing this allows each site to have its own list of identifiers. If you have the developers at your disposal they can also add special ids to the fields that are used only for qa. This is valuable because they can move things all over the screen and as long as they don't change the 'qaid' of the field your list will stay current and your tests will not break. This approach takes some work from your developers to add the qaids to the elements but once it is done your tests will work a lot better. It also eliminates the need to traverse Xpaths or complex CSSSelectors.






                  share|improve this answer












                  If I am understanding you correctly using Page Object Model will result in separate frameworks because each site will have its own identifiers. It is basically making a map of the site that can be accessed by your Selenium project.



                  This is how I have implemented it in the past.



                  Create One Solution in Visual Studio. Then create separate Projects for each site within that one solution. Also create a common project also with things that all of the sites need to share. You can do some of your shared Selenium stuff in the common project.



                  In each individual project you can either implement Page Object Model or you can add each element to your app config and reference it with the Configuration Manager. Doing this allows each site to have its own list of identifiers. If you have the developers at your disposal they can also add special ids to the fields that are used only for qa. This is valuable because they can move things all over the screen and as long as they don't change the 'qaid' of the field your list will stay current and your tests will not break. This approach takes some work from your developers to add the qaids to the elements but once it is done your tests will work a lot better. It also eliminates the need to traverse Xpaths or complex CSSSelectors.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 9 at 21:54









                  J.R. Bye

                  13




                  13






















                      up vote
                      0
                      down vote













                      Having all the applications/projects in the same framework is also valid.
                      Our current framework handles a handful of projects including api.



                      You could also go with no dedicated test repo, and just have the framework be part of the application/project it's testing.



                      All architectures have pros and cons.



                      Keeping all the projects in one framework will allow for easier sharing of base methods, and it helps with de-duping of logic.
                      You would keep projects separate with a folder structure that mimics your setup.
                      You could have a base class that instantiates the selenium driver, which is then used by other base classes pr project.






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        Having all the applications/projects in the same framework is also valid.
                        Our current framework handles a handful of projects including api.



                        You could also go with no dedicated test repo, and just have the framework be part of the application/project it's testing.



                        All architectures have pros and cons.



                        Keeping all the projects in one framework will allow for easier sharing of base methods, and it helps with de-duping of logic.
                        You would keep projects separate with a folder structure that mimics your setup.
                        You could have a base class that instantiates the selenium driver, which is then used by other base classes pr project.






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Having all the applications/projects in the same framework is also valid.
                          Our current framework handles a handful of projects including api.



                          You could also go with no dedicated test repo, and just have the framework be part of the application/project it's testing.



                          All architectures have pros and cons.



                          Keeping all the projects in one framework will allow for easier sharing of base methods, and it helps with de-duping of logic.
                          You would keep projects separate with a folder structure that mimics your setup.
                          You could have a base class that instantiates the selenium driver, which is then used by other base classes pr project.






                          share|improve this answer












                          Having all the applications/projects in the same framework is also valid.
                          Our current framework handles a handful of projects including api.



                          You could also go with no dedicated test repo, and just have the framework be part of the application/project it's testing.



                          All architectures have pros and cons.



                          Keeping all the projects in one framework will allow for easier sharing of base methods, and it helps with de-duping of logic.
                          You would keep projects separate with a folder structure that mimics your setup.
                          You could have a base class that instantiates the selenium driver, which is then used by other base classes pr project.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 12 at 16:40









                          Arild Andreassen

                          513




                          513



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233019%2fselenium-framework-c-sharp%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Use pre created SQLite database for Android project in kotlin

                              Darth Vader #20

                              Ondo