Writing simple code with Selenium C# -- Part 3 (Selenium automation with C#)
HTML-код
- Опубликовано: 15 ноя 2024
- In this part we will discuss writing simple code in selenium C#
To learn more from ExecuteAutomation, please subscribe and check out below playlists of FREE courses
Selenium and C#
**************
C# for automation testing - • C# for Automation Testing
Selenium with C# - • Introduction to Seleni...
BDD with Specflow - • BDD and Specflow
BDD with Selenium - • BDD with Selenium and ...
Selenium .NET Core - • Playlist
Selenium and Java
***************
Cucumber with Selenium (cucumber focused) - • Section 1 - Cucumber w...
Cucumber with Selenium (selenium focused) - • Section 2 - Cucumber W...
Cucumber 4 Upgrade - • Section 3 - Upgrade to...
Selenium Grid - • Selenium Grid
Selenium framework development - • Selenium Framework Des...
Selenium 4 - • Selenium 4
Selenium Grid with Docker - • Selenium Grid with Docker
API Testing
*********
API Testing with RestAssured - • API Testing with REST-...
API Testing with RestSharp - • API Testing with RestS...
API and Database Testing in C# - • API and Database Testi...
Automation testing with Puppeteer - • Puppeteer
End to End testing with Cypress - • Cypress Tidbits
CI/CD with Microsoft Technologies
****************************
Azure DevOps Service 2019 - • Azure DevOps Service 2019
TFS 2015 - • TFS 2015 (QA & Dev foc...
TFS 2015 Build System - • TFS 2015 Build Systems
Automated Build deployment with TFS 2015 - • Automated Build+Deploy...
Jenkins - Build + Deploy + Test with Jenkins - • Build+Deploy+Test with...
Docker
******
Understanding ABC of Docker - • Understanding ABC of D...
Understanding Docker for Windows - • Understanding Docker f...
Selenium Grid with Docker - • Selenium Grid with Docker
Kubernates for Testers - • Kubernetes for Testers
Mobile Testing
*************
Understanding Appium - • Introduction to Appium...
Appium with C# - • Introduction to Appium...
Appium with Java - • Setting stage ready fo...
Appium with C# (Advanced) - • Introduction to Appium...
Appium Framework development - • Introduction to appium...
Mobile Automation testing with Xamarin.UITesting - • Part 1 - Introduction ...
Android automation with Robotium - • Part1 - Introduction t...
Flutter app automation with Flutter Driver - • Part 1 - Introduction,...
TestProject - • TestProject (Basic)
Katalon Studio - • Katalon Studio
WinAppDriver - • Windows Application Dr...
Raspberry Pi 3 - • Introduction to Raspbe...
Testim.io - • Testim.io
Angular Automation - • Angular automation wit...
EAWeekly - • EA Weekly
Mocking framework - • Moq - Mocking framework
Just written my first Selenium code. Thanks a lot and looking forward to improving my skills with your videos
Very good starter demo, easy to understand with well thought out information.
simply awesome.....Thank you very much for this useful tutorials..
Fixing the "unknown error: unrecognized Blink revision :
instead of using the chrome driver used in the tutorial,
install the "Selenium.WebDriver.ChromeDriver" by jsakamoto
worked for me
Thank you very much!
Great, thanks for your information Maor Bakshi
thank you it works now
thanks works for me
Good fix
Great work karthik
Thank you so much for these awasome tutorials!!!
Very well explained .. Thank you very much !!!
For me with the CJ Payne fixes it work. I use VS 2015, and the latest packages in 1st February 2017 :) Thank you all.
Thank you for your video, I learned a lot from it.
I have created test cases in VS IDE. It runs well. How do I add code to slow down the process like the Selenium IDE which allows you a time value?
you can use Firebug to find the ID or name of the particular field.
Hi Karthik thank you very much for the videos... unfortunately im couldn't see the run test option when i right click to run a test. im using vs2010 ultimate.please help to resolve my issue.
The Test Explorer is available under Test Menu. But I would request you to change to latest version of visual studio 2015, which have everything you are seeing in the video !!!
Thanks,
thanks men....you rules!!
Alejandro Fernández Thank you my friend!
thank you! do you know what should I do when I publish an app?? I mean I run the published app but for some reason it doesn't work, selenium doesn't run, any idea???
your automation videos are truly awesome. Thanks!
robertshuxley Glad you like it !!!
In the console application the IwebDriver works but not in the C# website getting error "User
Unable to obtain firefox or chrome using Selenium Manager;"
Thank you for the great videos!
thank you for these videos. You are truly a great help. How to Use Assertions in C# for test Case Validation?
is there a way to perform search and data scraping without the browser to open?
Thanq very much for this tutorial :)
any pros or cons to using a console app vs a class library ?
Thank you
wtf this is so cool! suscribed!
Thanks man !
Hi doing the same as shown in the video but getting this error "
object does not contain a definition for Gotourl and no extension method 'gotourl' accepting a first argument of type object could be found
(are u missing a using directive or an assembly reference)"
I am running the same code but getting exception "System.ArgumentException: 'elementDictionary Parameter name: The specified dictionary does not contain an element reference'" on line "IWebElement element = driver.FindElement(By.Name("q"));" . Could you please help with this error
Hi, Can we make Edge as default browser here....!
hi, I am using vs 2015 but when i try to run it by clicking "start button" it runs, opens the console then closes saying that unhandled exception occurred this the code i have typed "IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("www.google.com");
IWebElement emlmnt = driver.FindElement(By.Name("q"));
emlmnt.SendKeys("hi");"
Thankyou
Thanks karthik... it':)
Nandani Nisha You are welcome
Thank you.
Hello sir,
nice tutorial,but am getting at error on running the code which shows an exception as stated below
unknown error: unrecognized Blink revision: d177478d466b84ab06f0f48081fc30e3b04be6ca
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)
it is pointing to the first line where we initialise the chrome driver
PLease HELP!!
Unfortunately, it seems that the "test webpage" is not existing anymore?
helfull, thanks
To avoid the Blink error I delete the file ChromeDriver.exe from the project Project/ProjectName/packages/Selenium.WebDriver.ChromeDriver.xxxx/driver and it works now
Hi brother when I run the test I got exception like session timeout after 60 seconds. How can I fix this?
thanks!
this code is not working visual studio 2010 I am getting Error 2 Cannot implicitly convert type 'seleniumFirst.FirefoxDriver' to 'seleniumFirst.Iwebdriver' please help me
+Execute Automation this is a great tutorial. Thank you for sharing. I followed your steps in my Win 10 machine using VS12 Ultimate edition. However I get the following error on running the test. May I know where I'm making the mistake. I have referenced both webdriver and Chrome driver to my project.
Error line:
IWebDriver driver = new ChromeDriver();
InavlidOperationException:
unknown error: unrecognized Blink revision: 9fd42dd40d33146ff9afd92f51714f0426c1247c
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)
+aravinthan ramraj Try to get the latest version of Chrome and Chrome Driver along with latest version of Selenium, it should fix !!!
+Execute Automation not for me :(
Thank you very much!
Unfortunately, I have this error: (I have the newest version of Selenium and also Chrome)
An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll
Additional information: unknown error: unrecognized Blink revision: c26c0312e940221c424c2730ef72be2c69ac1b67
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64)
+Ollie C. Please try to update Chrome as well !!!
+Execute Automation And ChromeDriver as well :)
I see like this and I updated chrome, but it still warn:
An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll
Additional information: unknown error: unrecognized Blink revision: 451c239c3b0722dc867b0f75839b959f729b756a
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)
Hi,
While executing same code i am getting,
"Starting chromedriver(v 2.10.267521) on port 57377 , only local connections are allowed"
where selenium version is 3.0.1 and chrome version is 2.10
kindly please help me
hi i'm facing the same issue is your issue fixed let know my friend and how can i fix this issue?
I am geting element not interactable error any solution ?
how i can get attribute data-myattr from below html:
Some Text
thank you , for this awesome video ,
i do every thing correctly but i faced this error
error :
OpenQA.Selenium.NoSuchElementException: 'no such element: Unable to locate element: {"method":"name","selector":"q"}
(Session info: chrome=66.0.3359.181)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 6.1.7601 SP1 x86_64)'
how to open the browser inside C# form ?
when i click start, it says consoleappliation2.exe missing
Hi, I'm facing some issues when I run this console application. It shows the error as "unknown error: unrecognized Blink revision: 0c319c380220abe3daf0277e40a2d0b22a7c4550
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)"
Can anyone help me to resolve the issue ?
the same issue
how did u solve this problem?
You must install Selenium.WebDriver.ChromeDriver
Hi,
I am getting below given error on executing this code
"InvalidOperationException" on browser reference code line.
"unknown error: unrecognized Blink revision: e8926f681fbb840b4f389e7e692343d4505722ce
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)"
Please give me a solution for it.
+Imran Ali Try to install latest browser and use latest ChromeDriver, this issue should go away !!!
+Execute Automation Thanks for reply, Now its working for chrome driver 2.20. I was using chrome driver 2.10. Thanks again.
+Imran Ali I have the same problem! I have donwnload just "C# 2.48.0 2015-10-07" and install it and now I have chrome driver 2.10, how should I update it?
+Imran Ali How did you get the 2.20 driver? Because in NuGet the latest one is still the 2.10 and I have problems with it.
+Lela Gabelaia Sorry for late replying, I have got chrome driver 2.20 from Nuget package you can downlaod and install from nuget packge.
It's asking for a file named remotewebdriver.cs
Please Help me out!
'OpenQA.Selenium.WebDriverException' running to this issue when i try to run the program
even i got the same use the following command in nuget console
Install-Package Selenium.WebDriver.ChromeDriver -Version 86.0.4240.2200-beta
getting this error done same thing as shown in this video --System.InvalidOperationException: 'unknown error: unrecognized Blink revision: 4fd852a98d66564c88736c017b0a0b0478e885ad
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)'
Hi not able to find element 😥
I had to download Chromedriver.exe manually and then indicate the path to it in the constructor "new ChromeDriver(@"C:\Program Files (x86)\Google\Chrome\Application");". Otherwise it threw an openqa.selenium.driverservicenotfoundexception exceptoin.
Voilá! You get the man of the day award today!
Thank you. Also I recommend to put this chromedriver.exe in your project folder, and use relative path to it, in case you are going to share your project with someone else
Exception System.Reflection.TargetInvocationException, Exception thrown executing testscan anyone help me to solve this problem when I execute test
This video is not loading
+Yasser Elghazi Its working for me, please check again !!!
turn off in future you yellow circle
Thank you for your video, I learned a lot from it.