
Chris Johnson
Top achievements
Rank 1
Chris Johnson
asked on 05 May 2010, 09:31 PM
I am running my test suite against IE, but one test has a bug that surfaces in IE only. I don't expect it to be fixed soon, so I want to force that one test to run against Firefox. Is there a clean way to do that? I tried adding a coded step that does the following:
But the browser is launched before the first step is executed, so I need to intervene earlier. This is not a unit test, so I don't have a test setup method at my disposal. I see that BaseWebAiiTest has a CleanUp() virtual method, but there is no corresponding SetUp().
My other thought was using a separate test list for that one test, along with a special testrunconfig file that specifies Firefox as the default browser. But I'm uncertain how to easily make that work in a TFS build - because there can be only one testrunconfig in a build, I believe I'd have to create a separate build definition for each browser.
Anyone know an easier way?
Manager.Settings.DefaultBrowser =
BrowserType.FireFox;
But the browser is launched before the first step is executed, so I need to intervene earlier. This is not a unit test, so I don't have a test setup method at my disposal. I see that BaseWebAiiTest has a CleanUp() virtual method, but there is no corresponding SetUp().
My other thought was using a separate test list for that one test, along with a special testrunconfig file that specifies Firefox as the default browser. But I'm uncertain how to easily make that work in a TFS build - because there can be only one testrunconfig in a build, I believe I'd have to create a separate build definition for each browser.
Anyone know an easier way?
5 Answers, 1 is accepted
0
Accepted
Hi Chris,
Thanks for the question. As a temporary add on to the test, please have a customized step at the top of the test before the Navigate test step. The customized step should contains the following:
Please note that, as you mentioned, an IE window will be launched, but the test should take place in the Firefox window that is launched by the custom step. Both browsers should be closed after the test finishes.
Please let us know if you have any further questions on this.
Regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks for the question. As a temporary add on to the test, please have a customized step at the top of the test before the Navigate test step. The customized step should contains the following:
[CodedStep(@
"Custom Firefox browser launch"
)]
public
void
WebAiiTest_CodedStep()
{
Manager.LaunchNewBrowser(BrowserType.FireFox, true);
}
Please note that, as you mentioned, an IE window will be launched, but the test should take place in the Firefox window that is launched by the custom step. Both browsers should be closed after the test finishes.
Please let us know if you have any further questions on this.
Regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hi again Chris,
Just wanted to check back to see if the custom step I posted works for you and launches Firefox for your test.
Sincerely,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Just wanted to check back to see if the custom step I posted works for you and launches Firefox for your test.
Sincerely,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0

Chris Johnson
Top achievements
Rank 1
answered on 11 May 2010, 03:32 PM
Nelson -
That sounds like a good solution, but I haven't been able to get my test passing, probably due to a different problem with confirmation dialogs in Firefox. I wrote a custom dialog handler based on code I found at http://www.artoftest.com/support/webaii/topicsindex.aspx, but it doesn't work reliably. I'll mark this question as answered and open a new one once I can characterize what's going on.
That sounds like a good solution, but I haven't been able to get my test passing, probably due to a different problem with confirmation dialogs in Firefox. I wrote a custom dialog handler based on code I found at http://www.artoftest.com/support/webaii/topicsindex.aspx, but it doesn't work reliably. I'll mark this question as answered and open a new one once I can characterize what's going on.
0
Hello again Chris,
Thanks for the reply back. Having a built in feature like this in WebUI would be useful, I'll log a feature request.
Please let us know if you have any further questions on this particular work around. Also, please do let us know if we can be of any assistance with the Firefox dialog by opening a new ticket on the issue.
Greetings,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks for the reply back. Having a built in feature like this in WebUI would be useful, I'll log a feature request.
Please let us know if you have any further questions on this particular work around. Also, please do let us know if we can be of any assistance with the Firefox dialog by opening a new ticket on the issue.
Greetings,
Nelson
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hello Chris,
We've added a Test.BrowserType property that overrides the one from the Settings on execution. It's default value is NotSet so the execution engine ignores it and takes the browser from the settings by default. Users can set it manually via the Properties to force the engine to launch that browser instead of the one in the settings. In Visual Studio you need to select the test in the TestView, right-click and find the BrowserType in the properties.
This feature will be included in the next official release due in July. We will also upload an internal build till the end of the week you can download and replace the current distribution with. I can follow up here once the build is uploaded, just let me know.
Thanks a lot for your feedback and please keep it coming!
All the best,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
We've added a Test.BrowserType property that overrides the one from the Settings on execution. It's default value is NotSet so the execution engine ignores it and takes the browser from the settings by default. Users can set it manually via the Properties to force the engine to launch that browser instead of the one in the settings. In Visual Studio you need to select the test in the TestView, right-click and find the BrowserType in the properties.
This feature will be included in the next official release due in July. We will also upload an internal build till the end of the week you can download and replace the current distribution with. I can follow up here once the build is uploaded, just let me know.
Thanks a lot for your feedback and please keep it coming!
All the best,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.