Before we create a Automation Framework Solution in C# we need install these prerequisites in the Visual Studio for any of the versions (2013,2015,2017) Installing Specflow Step 1: Click on Tools and then...
The below one is a custom wait functionality that can be used to detect element in Selenium.And it’s usage has been also declared below. All we have to do is declare this as part...
The below code helps you to take the screenshot in Selenium using Specflow. And the code is executed only After the scenario is executed, So when the step of the scenario fails, it takes...
The below code can be used to share the geolocation details in Selenium It does these Opens the content popup in Chrome Clicks on the radio button – share the location details Then Click...
Taking screenshot using C# with Selenium is very easy as it has a inbuilt function
//Taking Screenshot in C#
Screenshot ss = ((ITakesScreenshot)Browser).GetScreenshot();
string title = ScenarioContext.Current.ScenarioInfo.Title;
string Runname = title + DateTime.Now.ToString("yyyy-MM-dd-HH_mm_ss");
string screenshotfilename = "X:\\screenshots\\" + Runname + ".jpg";
And in the above code X is networked drive from any node so that it allows us to...
Sometimes Cookies needs to be set in Selenium so that it automatically loads up a page with predefined values or something else.And Selenium has inbuilt functionality which allows to set Cookies in any language...