I'm trying to grab the current url during a test and append some text on the end of it, to navigate to a certain page.
For context, we have both a production and debug server. I figured it would be easier instead of toggling between the debug/prod urls in a NavigateTo step (which would also defeat the purpose of continuous integration because we would have to manually change it).
However, what I came up with, I'm getting a compiler error:
...tstest.cs(56,33) : error CS0103: The name 'HttpContext' does not exist in the current context
The namespace that is supposed to be used according to Microsoft is System.Web.
This is the code block that I'm using:
currentUrl = HttpContext.Current.Request.Url.AbsoluteUri;
//Append the /share to the url
urlWeWant = currentUrl +
//Navigate to the url