- Introduction to Selenium with C#
- Referencing Selenium C# in Visual Studio
- Simple code with Selenium C#
- Using NUnit with Selenium C#
- Custom methods for Controls in Selenium with C# (Part 1)
- Custom methods for control in Selenium C# (Part 2)
- Refactoring Custom methods of control libraries
- POM in Selenium C#
- Page Navigation in Selenium C#
- Customizing custom library methods
- Using C# Extension methods for Selenium custom libraries
- Data Driven Testing using Selenium with C#
how I can integred my test in jenkins CI ?.
Its as normal as using Jenkin plugin for Visual Studio IDE.
Thanks,
Karthik KK
Hi karthi pls share some more videos on selenium with c# implementing framework in depth pls pls..
How to configure the methods Initialize() and CleanUp() execute only after all the tests run?
Thanks,
Hi Ramon,
You can use ClassInitialize and ClassCleanup attributes.
https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.classinitializeattribute.aspx
How can i write a method for date picker that pick today+15days date?
I am new to automation and need to understand each and every line that is not clear and easily understood.
what does the below line mean?
InternetExplorerDriver driver = new InternetExplorerDriver
If this is the case, then you should watch another playlist, selenium tid-bits https://www.youtube.com/playlist?list=PL6tu16kXT9PoIHrwaqkBitAmjlrG1Bgxp
I need a training on selenium with C#. Let me know weather your providing any online training. Please provide the information as soon as possible. Our project is going to automate with selenium with C#
In video #11 you went over C# extensions. Does Java have a similar extensions feature?
Nope, Java don’t have one.
Thanks,
Karthik KK
If Java does not have the feature, then how would you do the same concept in Java?
Which feature ?
The extensions feature. Do you have to use the @overload concept?
You can overload a method in C# as well. You dont have to explicitly specify the annotation @overload
Hi Karthik,
I wanted to know does Nunit attributes.. How do we execute the methods dependent on other methods, as in like in testng we have depends on annotations.. How about nunit
What do you mean by dependent ?
Hi Karthik
I went through your videos on Selenium Webdriver using C#. It is very good. Thank you very much. I am basically a Test Automation engineer, but used Java. The present employer is a Visual Studio C# platform. So I am trying to convert the Java webdriver framework (Keyword Driven framework) into C#. I am stuck at the point where I have to write an equivalent C# for config.properties file. My statements in that would be for now (and later will keep increasing key=value pair):
url=http://www.google.com/
browser=firefox
screenshotpath=screenshots/
How can I accomplish this in C# ? Google gives a lot of answers, but since I am new to C#, unable to see which is the best. Will you please be able to guide me on this ? I created a SpecialSettings.Properties file in the Property folder of the C# project, but do not how to use it.
Thanks & Regards
Lakshmi
Properties files does not exist in C#, rather the more straight-forward way is to go with App.config file and create something like this
Karthik your videos are really very helpful to start with. I want to know how to find the line number of any div element in Selenium.
HI Chandan,
Hope this video will give you a idea
https://www.youtube.com/watch?v=BCc3rHwPF5c&index=9&list=PL6tu16kXT9PoIHrwaqkBitAmjlrG1Bgxp
Thanks,
Karthik KK
Hi , could you please post video on Assert in selenium C#
HI Karthik,
Do you take any online classes for C# with selenium.
Please let me know in case u take it.
I am willing to take classes asap.
Regards,
Akash
selenium web driver c# is-there-a-way-to-sniff-the-incoming-outgoing-HTTP-requests
how handle . please can you post solution
http://www.answee.com/53c0185d/selenium-rc-is-there-a-way-to-sniff-the-incoming-outgoing-http-requests
Are there any libraries for reporting in selenium webdriver, c#,specflow
Please upload full tutorial videos for all the topics of Selenium using C#. I want to learn Selenium 2.0.
Hi karthik pls post all videos of selenium with # from scratch to framework implementation pls…it would be helpful for lot of us who are stuck…
I’ve reviewed all your excellent videos on Selenium, Coded UI and using the Selenium add-in in VS so that you can use POM. I am very frustrated about one thing and hope you can help/enlighten me. I typically turn on the verbose logging in CUIT (setting EqtTraceLevel to a value of 4 in the App.config). However, once I changed my application over from the hand-coding technique you showed, to using POM techniques, the verbose feedback is no longer showing, except if a failed line is hit. I have not discovered any way to get the line-by-line passes and fails feedback that I used to have. As I said, for tests where I am not using POM, I have the feedback. With POM, no feedback, except for a failed line.
Is it because CUIT is API developed by MS and Selenium is not.
Even I am not pretty sure about it to be honest 🙁
Hi Karthik,
i am trying to use latest selenium version 2.47.0 with VS2008 and with first program i am getting following exception:
Unhandled Exception: System.MissingMethodException: Method not found: ‘Boolean System.Runtime.Serialization.DataContractAttribute.get_IsReference()’. at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract)
do you have any idea what could be missing.
Thanks in advance.
Did you tried to add the latest version of Newtonsoft json https://www.nuget.org/packages/Newtonsoft.Json/ from Nuget.
Thanks,
Kartik KK
Hi Karthik,
I got below error message after building project of Selenium ,C# , Specflow,POM example.Please can you help me on this?
Generation error: SpecFlow configuration error -> The element may only appear once in this section.
Thanks
kumar
hi karthik,
im new to automation. pls let me know how to handle popup in visualstudio using selenium
thanks,
Thirupathi
I would like to know Assertion in selenium web driver C# to verify the search text.
Hi Karthik,
Your doing Brilliant Job. This site and Videos helps a lot to beginners. I have one doubt, I want know how to write automation code for each test case in Test Case document. Like for Each Test Case we have to write one [Test] method or What is the alternative way.
Suppose for Login Page, test case is Login with valid data. We will write it in [Test] method. Again login with in valid data, again another [Test].
If we write like this, For Login page we can write multiple tests[Test] methods. Then How will be the flow. Load url -> execute [Test] -> close browser for each [Test]. I am confused to write multiple tests [Test] and automate a project. Can you take a small example like Login page navigating to Some search page and explain How to automate with multiple tests.
Thanks,
Hi Karthik please provide me the code for Login & mouse hover drop down in selenium with C#
Hope the code is there in the URL http://executeautomation.com/blog/mouse-hover-click-selenium/
Thanks,
Karthik KK
Hey Karthik. Excellent tutorials! It’s a great help. When a new page loads after clicking on an element, should we always perform a wait?
Do you have a tutorial or code for this?
Thanks,
Huy
I just saw the Tidbit sections. I think that will help!
Hi Karthik,
I watched selenium with Java and C# and videos are Excellent. But i want to know more about Exception handling using C# and as well how to use
different types of wait method.
If you could provide me the any available videos or examples that will be helpful for me.
Thanks in advance.
I want to learn from you, could please tell me how much you will charge and will you be able to teach me over skype etc.
Hi Karthik,
Please advise on handling popup in selenium using C# and alongwith that how we can identify element on the popup window.
Thanks
Amita
Hi Amita,
Should be this https://www.youtube.com/watch?v=1B8TKnUt0iA&list=PL6tu16kXT9PoIHrwaqkBitAmjlrG1Bgxp&index=8
Thanks,
Karthik KK
How to add Explicit and Implicit Waits in class “SeleniumSetMethods”? Add “Wait(element)” before Clicks, EnterText, etc.. actions? Thanks
I have multiple feature files for my project and I want to run these feature file according to my way that firstly feature 1 run,and after that feature file 2 will run and then feature file 3 will run in a way.
How can I do this please?
Thanks
Mian Sumair Javed
You cannot order the scenarios of features files or order the feature file itself to execute.
My advise will be this
1. Keep each test independent of each other.
2. If your test seems to be dependent, then try to prefix some values like 1_Login, 2_UserForm etc (Not recommended)
Thanks,
Karthik KK
Hi Karthik,
do you give online training for selenium with c# . will you please let me know as soon as possible.
Hi Karthik ,
How can I find the Iframe element in POM , like the other elements and also access its elements ?
How would I assert istrue true a jpeg video source from a live stream?
I want to run my Selenium Test case and Appium Test in parallel? How can I achieve that?
Below is my sample code:
class Program
{
static IWebDriver driver;
static DesiredCapabilities dc;
public static void Main(String[] args)
{
if (sel.flag.Equals(true))
{
try
{
Uri uri;
dc = new DesiredCapabilities();
dc.SetCapability(“browserName”, “chrome”);
dc.SetCapability(“platformName”, “Android”);
dc.SetCapability(“deviceName”, “Nexus 5”);
dc.SetCapability(“platformVersion”, “6.0.1”);
uri = new Uri(“http://127.0.0.1:4723/wd/hub”);
driver = new RemoteWebDriver(uri, dc, TimeSpan.FromSeconds(120));
}
catch (Exception e)
{
}
}
else
{
driver = new ChromeDriver(@”C:\Users\******\Desktop\softwares”);
}
driver.Navigate().GoToUrl(“http://www.google.com”);
Console.WriteLine(“done”);
Console.Read();
driver.Close();
}
}
Hi Karthik,
Thank you for starting this portal. Really helpful for developers/testers who want to explore Selenium
one question – in my case, I have one pivot table in my web report (Qlikview). I want to use Selenium with C# to test my report.
Basically to compare pivot table data with expected results stored in excel sheet.
How Can I implement this test case?
Hi Rahul,
If its going to be just table comparison, I would say you can get the table data and store in a in-memory collection and then perform comparison operations.
Here is the link to do it though
http://executeautomation.com/blog/working-with-complex-table-using-selenium/
Thanks,
Karthik KK
HI karthik,
How can we handle system.net.webexception? and I want to set wait for pageload to 2 min using c# but I couldn’t and it is taking only 60 seconds(page in my app takes more than 60 sec to load) then Iam getting [timed out after 60 seconds] exception. could you please tell me a way to do that..that would be great.
thanks in advance..
Hi Srikanth,
Can you implicit wait for 2 min using Selenium.
If you are getting timeout in application because of its response, then you have to handle only in application code, not from your automation.
Thanks
Hi karthik ,
below is the code that i have used for both page load as well as implicit wait, but this is not working for me:-(
this.Driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromMinutes(3));
this.Driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(120));
— one more thing is , as i have mentioned that page load in my app takes more than 1 min,I as automation tester has to perform action according to that.but I am getting following exception[The HTTP request to the remote WebDriver server for URL http://localhost:65482/session/7b40c5eb7d22604f9d6a9807bac5f654/element timed out after 60 seconds. —> System.Net.WebException: The operation has timed out]
Hi karthik,
how to wait for clicking on an element(button) even though element is visible and enabled . but element is blocked for some time[time is not constant] by some message[Please Wait] .please provide a solution ASAP.
*
Thanks ,
Srikanth
Hi Karthik,
I have gone through most of the videos regarding Selenium with C#.I tried to implement the Pagination using Page object model for one of the website.The page is getting redirected to the website on a button click and i am getting the error that unable to find the Id when i run test and when i tried to debug the same code i am not getting any error and the test is getting executed successfully.
I tried the sample referring the video posted in youtube by executeautomation.Its working fine in this.
I like the way you teach selenium and it is very easy to learn and i am expecting other technical videos from you.
Regards,
Ravi
Hi Karthik,
Thank you for helpful and excellent training videos.
Could you upload Visual Studio Project files (used in Selenium automation with C# videos).
Regards,
Hi karthick, Im new to selenium, how much c# knowledge is required for automation?
I think strong basic C# knowledge is good to start with !!!
Hi karthick, Is that possible to create Appium testcases in visual studio? now im using appium in eclipse, i feel its very hard.
Please watch the Appium with C# video series in ExecuteAutomation channel, which should help !!!
Hi,
I am working on webservices, so to validate response, wanted to connect data base, so started created .dbml file for database.
but not fully done.
Do you have any videos on this?
thanks
Rani
New Video series on the way for API and web service testing https://www.youtube.com/playlist?list=PL6tu16kXT9PrHl9RTqJ6lAUA2ViJPZXna
Thanks,
Karthik KK
Everything is fine, am happy about your blog. Thanks admin for sharing the unique content, you have done a great job I appreciate your effort.
Hi Kathik,
How to test RESTful API using selnium and C#. Do you have videos for that?
Thanks,
Vidya
Hi Kathik,
Now using you page :
http://executeautomation.com/demosite/index.html?UserName=&Password=&Login=Login
for experiments with WebDriver, and can’t enable or disable checkboxes English and Hindi. Tried either find by name either by css selector – the same. WebDriver can verify is they are selected, but can’t enable or disable.
Can you tell, what can be the reason?
Thanks,
B.R.
Valentin.
Hello Karthik, Thanks for the awesome videos on Selenium with c#, could you please upload videos on TestNG using visual studio?
I have seen videos of testNg in eclipse but i want them on visual studio please.
TestNG is not supported in Visual studio, We have NUnit in C#, which you can find from here https://www.youtube.com/watch?v=ltfECNuxjN0
Hi karthik
Could you please add reporter.cs file.
Thanks!
Hi I loved the videios. Can you please upload your EAEmployee project so that I could try and test? Many thanks!
Hi Dimpy Sharma,
The EAEmployee Project is part of udemy course which you can find from here https://www.udemy.com/framework-development-with-selenium-csharp-advanced
Thanks,
Karthik KK
The Author had done a great job! He has given information about Selenium in C# along with Visual Studio IDE. Selenium is one of the leading software testing tools in the current industry and it provides a record/playback tool for authoring tests without learning a test scripting language.
Hi,
Looking for some kind of documentation , how to map selenium driver scripts with manual test cases in MTM.
Thanks