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.
c# selenium-webdriver frameworks
add a comment |
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.
c# selenium-webdriver frameworks
add a comment |
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.
c# selenium-webdriver frameworks
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
c# selenium-webdriver frameworks
asked Nov 9 at 20:44
Prp
12
12
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 9 at 21:54
J.R. Bye
13
13
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 12 at 16:40
Arild Andreassen
513
513
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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