Hi,
I have recently come across the WebAii Testing Framework and as a proof of concept wanted to implement some tests using NUnit against one of our projects (ASP.NET MVC 2).
The following config is set:
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
configSections
>
<
section
name
=
"WebAii.Settings"
type
=
"ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii"
/>
<
section
name
=
"WebAii.Settings.Web"
type
=
"ArtOfTest.WebAii.Core.WebSettingsConfigSectionHandler, ArtOfTest.WebAii"
/>
</
configSections
>
<
WebAii.Settings.Web
aspNetDevServerPort
=
"1234"
baseUrl
=
"http://localdev.mydomain/mysite/"
localWebServer
=
"AspNetDevelopmentServer40"
defaultBrowser
=
"InternetExplorer"
enableScriptLogging
=
"true"
enableSilverlight
=
"false"
enableUILessRequestViewing
=
"false"
killBrowserProcessOnClose
=
"false"
recycleBrowser
=
"false"
silverlightApplicationPath
=
""
silverlightConnectTimeout
=
"30000"
useHttpProxy
=
"false"
verboseHttpProxy
=
"false"
webAppPhysicalPath
=
"C:\mysite\mysite.Web"
/>
<
WebAii.Settings
annotateExecution
=
"false"
annotationMode
=
"All"
clientReadyTimeout
=
"30000"
createLogFile
=
"true"
enableUILessRequestViewing
=
"false"
executionDelay
=
"200"
executionTimeout
=
"20000"
logAnnotations
=
"false"
logLocation
=
"C:\WebAiiLog\"
queryEventLogErrorsOnExit
=
"false"
simulatedMouseMoveSpeed
=
"0.3"
unexpectedDialogAction
=
"HandleAndFailTest"
waitCheckInterval
=
"500"
xMultiMgr
=
"false"
/>
</
configuration
>
And the code in my unit test looks is:
// Launch a browser instance
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
// The active browser
ActiveBrowser.NavigateTo(@
"~/Home"
);
I am expecting to navigate to: http://localdev.mydomain:1234/mysite/Home
But get: http://localhost:1234/Home instead
I have the following mapping in my hosts file:
127.0.0.1 localdev.mydomain
I'm not sure if I have my settings wrong? I would appreciate any help with this issue.
Thanks