I am new to specflow. Currently I am having a problem how to get a response text from browser button click. So below is my code
Scenario Outline:Download Questions and it should contain csv file extension
Given I am logged in as a user
When I select value "Ordinary" of select object with id "QuestionType"
And I select value "Answered" of select object with id "DisplayStatus"
And I click on the Download button
From browser when I click download button it downloads a csv file and I want to write same scenario how can I check if the response text is csv ?
Please let me know if you need any more information.
Ok I am using selenium driver to run the features.
Below is some code
[Given(@"I am logged in as (?:a|an) (.* user)")]
public void GivenIAmLoggedInAs(LoginTypeName loginTypeName)
{
string pageUrl = PageFactory.GetPageUrlFor(PageName.Home);
CurrentDriver.GoToWithBase(pageUrl, _baseWebsite);
CurrentDriver.FindElementById(LoginFactory.GetLoginElementFor(loginTypeName)).Click();
WaitUntilClickableById("footer");
}