CosmoCode
CosmoCode
  • 12
  • 123 157
How to execute JavaScript in Selenium?
In this video we'll learn how to use mighty JavascriptExecutor to execute JavaScripts in Selenium WebDriver.
In real life projects, it happens that sometimes the WebDriver is not able to perform the action on a particular element. There can be several reasons for that. One of the reason is that since WebDriver simulates end-user interaction, it is natural that it will refuse to click on an element that is not visible to end user. Sometimes it happens that although the element is visible on the page, still WebDriver thinks it is not visible.
In these cases, we write a piece of JavaScript to click or perform other actions on that element and make it execute through WebDriver.
Previous Videos Links:
1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html
2. Writing the first Selenium script - th-cam.com/video/YaUbjz4p-FU/w-d-xo.html
3. How to locate elements in the page (by using its id, class or name attribute) - th-cam.com/video/4XIyfkgNJOo/w-d-xo.html
4. How to use XPath to locate elements in the webpage - th-cam.com/video/ku7vb4ox8M0/w-d-xo.html
5. How to use CSS Selector to locate elements in the webpage - th-cam.com/video/5PX79YgseWo/w-d-xo.html
6. How to use WebDriver Locators and interact with the UI elements?
th-cam.com/video/FPV2mFTpLH0/w-d-xo.html
7. Tricks to find UI elements like an expert in Selenium
th-cam.com/video/ef7YYYFF-e4/w-d-xo.html
8. Implicit & Explicit Wait | Write robust Selenium script that does not break with load time issues
th-cam.com/video/RK0si4KWBaY/w-d-xo.html
9. How to handle Alert box in Selenium? Click OK, Cancel or get the text.
th-cam.com/video/urDaiP9KkqY/w-d-xo.html
10. How to handle Popup Windows in Selenium? Switch by using window handle or page title
th-cam.com/video/4zGr995w3T8/w-d-xo.html
มุมมอง: 2 160

วีดีโอ

10. How to handle Popup Windows in Selenium? Switch by using window handle or page title
มุมมอง 1.3K5 ปีที่แล้ว
In this tutorial I'll show how to write Selenium script that can handle popup windows. By the end of this video you'll master the art of switching between multiple browser windows and can write code according to the requirements. Previous Videos Links: 1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html 2. Writing the first Selenium script - th-cam.com/video/YaUbjz4p-...
9. How to handle Alert box in Selenium? Click OK, Cancel or get the text.
มุมมอง 1.1K5 ปีที่แล้ว
Modern web pages display an alert dialog on performing certain operations. As an automation engineer, it is important to know how to handle them. In this video, I'll write Selenium code to handle alert dialog and perform various operations on them like click OK, Cancel or get the text from the alert box. Previous Videos Links: 1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w...
8. Implicit & Explicit Wait | Write robust Selenium script that does not break with load time issues
มุมมอง 7055 ปีที่แล้ว
By the end of this 20 minutes video, you'll be an expert in writing a robust script - a script that doesn't break due to the loading time of the page or its elements. It is a very important learning for automating real-world complex web apps. I'll write code and automate a scenario from scratch that demonstrates different wait conditions like - wait till element is visible wait till element is ...
7. Tricks to find UI elements like an expert in Selenium
มุมมอง 2.6K5 ปีที่แล้ว
By the end of this video, you'll be an expert in locating UI elements. I'll share some cool techniques to locate elements. Also, there are scenarios where we need to find multiple similar elements in one go. In this video, I'll demonstrate the use of findElements method for this purpose. I'll show how to write code to find child element inside an element. And finally I'll demonstrate how to int...
6. How to automate any webpage by using Selenium?
มุมมอง 17K6 ปีที่แล้ว
By the end of this video, you'll be able to automate any HTML page that has all sort of UI elements like button, link, input box, list, radio, checkbox etc. You will learn to use WebDriver Locators to locate UI elements(link, button, input etc) and interact (click, type, select etc) with them. You'll also learn to get text of any element in the page. Previous Videos Links: 1. How to setup syste...
5. How to use CSS Selector to find elements in the webpage
มุมมอง 24K6 ปีที่แล้ว
In 16 minutes, I'll make you learn to use CSS Selectors in Selenium like a pro. Previous Videos Links: 1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html 2. Writing the first Selenium script - th-cam.com/video/YaUbjz4p-FU/w-d-xo.html 3. How to locate elements in the page (by using its id, class or name attribute) - th-cam.com/video/4XIyfkgNJOo/w-d-xo.html 4. How to u...
4. How to write XPath to find elements in the webpage
มุมมอง 11K6 ปีที่แล้ว
In this video, I'll take you on an XPath journey where you starts at ZERO and by the end of this video, you become XPath HERO. Previous Videos Links: 1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html 2. Writing the first Selenium script - th-cam.com/video/YaUbjz4p-FU/w-d-xo.html 3. How to locate elements in the page (by using its id, class or name attribute) - th-ca...
3. How to find id, class or name attribute of UI elements in the webpage?
มุมมอง 24K6 ปีที่แล้ว
Within 7 minutes, I'll make you a pro in locating elements in the page by using its id, class or name attribute. Locating an element is the most critical part of Selenium or Test Automation. Previous Videos Links: 1. How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html 2. Writing the first Selenium script - th-cam.com/video/YaUbjz4p-FU/w-d-xo.html
2. Hello Selenium! Writing the first Selenium script
มุมมอง 1.5K6 ปีที่แล้ว
In this video I will help you move your first step towards Selenium. By the end of this 13 min video, we'll write our first Selenium script and run it. I'll explain every line of code used in the script. Previous Videos Links: How to setup system for Selenium - th-cam.com/video/PDeJIIIJMzs/w-d-xo.html
1. How to setup system for Selenium
มุมมอง 2.2K6 ปีที่แล้ว
In less than 9 minutes, I will help you setup your system for Selenium. I will demonstrate how to download and install applications and libraries required for Selenium. Next Video: How to locate elements in the webpage th-cam.com/video/4XIyfkgNJOo/w-d-xo.html If you prefer reading to listening please follow the tutorial - www.teachmeselenium.com/2014/04/18/java-selenium-system-setup-installing-...
How to connect Selenium to an existing browser that was opened manually?
มุมมอง 36K6 ปีที่แล้ว
You can read the article in CosmoCode.io Here is the link - CosmoCode.io/how-to-connect-selenium-to-an-existing-browser-that-was-opened-manually Ever wondered how to connect Selenium to a browser that was not opened by Selenium? In this video, I'll demonstrate a way to make it possible. Here is an equivalent Java code - System.setProperty("webdriver.chrome.driver", "C:\\selenium\\chromedriver.e...

ความคิดเห็น

  • @bindhumadhavi6736
    @bindhumadhavi6736 17 วันที่ผ่านมา

    Hi, how to find shadow root elements with css using partial inner text?

  • @HannaSiby-w5h
    @HannaSiby-w5h หลายเดือนก่อน

    Thank you. Your video was really helpful.

  • @DrTLN
    @DrTLN 3 หลายเดือนก่อน

    hi sir, please help tell me how to handle capcha from image to text in web automation

  • @SaravanaKumarR-ti3dx
    @SaravanaKumarR-ti3dx 3 หลายเดือนก่อน

    can you automate flutter web application using selenium?

  • @Naagu119
    @Naagu119 5 หลายเดือนก่อน

    Usefull video

  • @HatTrick4030
    @HatTrick4030 7 หลายเดือนก่อน

    It was so helpful. Thanks for the video

  • @mohinisarode9962
    @mohinisarode9962 11 หลายเดือนก่อน

    How to do for Internet explore plz help

  • @jivey5123
    @jivey5123 ปีที่แล้ว

    Ew

  • @nyashanation
    @nyashanation ปีที่แล้ว

    How to copy id of an ad

  • @akshathbharathi7376
    @akshathbharathi7376 ปีที่แล้ว

    How to do it in firefox?

  • @sauravsuman1138
    @sauravsuman1138 ปีที่แล้ว

    This was something I was looking for. Thank you so much , now I think my problem will be solved

  • @JoshGodwinArt
    @JoshGodwinArt ปีที่แล้ว

    I don't get why selenium wouldn't make this super easy by default. Who wants to have to run through each step to debug one thing. Thanks this helps a ton.

  • @sathishyadav6517
    @sathishyadav6517 ปีที่แล้ว

    Thank you

  • @Livespiritful
    @Livespiritful ปีที่แล้ว

    My Requirement is: Prerequisites: 1) Launch Google Chrome as "Run as Different User" (Right click of the Chrome icon) 2) Enter Windows user and password in the popup when it appears 3) Google chrome launches manually Actual Test begins: I need to enable the bridge with the manually opened Google Chrome browser and then continue the rest of the test. Do you have any solution? Your help is very much appreciated.

  • @darkevil9348
    @darkevil9348 ปีที่แล้ว

    Do we also had to add driver.get () because in my case it is giving me error that couldnt located the element.

  • @hakimakbary65
    @hakimakbary65 ปีที่แล้ว

    how about if I want to choose the element based on index number? In xpath, it is possible. When you have 6 elements with the same selector, you can choose it with index number. For example, what will be the equivallent for this xpath address in CSS? (//i[@class='fa fa-plus-circle'])[1]

  • @divyanair5169
    @divyanair5169 ปีที่แล้ว

    Great lessons for a Great teacher. Thank You.

  • @TunahanGoker
    @TunahanGoker 2 ปีที่แล้ว

    altyazı nerde lan

  • @uriri490
    @uriri490 2 ปีที่แล้ว

    hi. can you make a C# version with Firefox? I'm searching for days and i cant managing to do. Thanks in advance.

  • @khichdisongs184
    @khichdisongs184 2 ปีที่แล้ว

    Thank you sooo much

  • @RavinderSingh-ck3wk
    @RavinderSingh-ck3wk 2 ปีที่แล้ว

    hi bro very good way to teach CSS. CAN U PUT SOME VIDEOS FOR LARAVEL DUSK THANKS

  • @sunlight_math
    @sunlight_math 2 ปีที่แล้ว

    IT's not working.

  • @maynerpts
    @maynerpts 2 ปีที่แล้ว

    спасибо

  • @oliverli9630
    @oliverli9630 2 ปีที่แล้ว

    automation rebellion!!

  • @aldwinjum7533
    @aldwinjum7533 2 ปีที่แล้ว

    what about innertext

  • @Kmm1295
    @Kmm1295 2 ปีที่แล้ว

    good video, im looking here but cant see cmments with assignment answers :)

  • @Churriittoo
    @Churriittoo 2 ปีที่แล้ว

    Thanks, man. You saved me a lot of time😃

  • @KAlisa-bx9ln
    @KAlisa-bx9ln 2 ปีที่แล้ว

    Thk you sooo much, I am at the very beginning and I found this tut. so helpful :D

    • @cosmocode5065
      @cosmocode5065 2 ปีที่แล้ว

      Thank you for the feedback. Much appreciated

  • @reikibelgradecorner6418
    @reikibelgradecorner6418 2 ปีที่แล้ว

    Well explained but it sounds like someone talks from the Moon

  • @sumathichandramohan9979
    @sumathichandramohan9979 2 ปีที่แล้ว

    Nice explanation easy to understand

    • @cosmocode5065
      @cosmocode5065 2 ปีที่แล้ว

      Thank you for the appreciation.

  • @thiripurasundarip7098
    @thiripurasundarip7098 2 ปีที่แล้ว

    Can you please tell the same for firefox options, since the properties are different here and cannot use the same. for example debugger address I'm not finding in firefox options.

  • @fun2u688
    @fun2u688 3 ปีที่แล้ว

    Could you please tell me how to connect Selenium to an existing MS Edge browser?

  • @mohitpannu27
    @mohitpannu27 3 ปีที่แล้ว

    how we can do this with firefox?

  • @SahilKaliavlogs
    @SahilKaliavlogs 3 ปีที่แล้ว

    Nice tutorial and very well explained . Thank You.

  • @tomatoahmed7380
    @tomatoahmed7380 3 ปีที่แล้ว

    Thank you soo much ❤❤❤. You Indians are excellent teachers.

  • @chienphamdanh3684
    @chienphamdanh3684 3 ปีที่แล้ว

    Thank you ##

  • @Tina_Awwad
    @Tina_Awwad 3 ปีที่แล้ว

    like & subscribed .. Very helpful. Thank You

  • @kanakTheGold
    @kanakTheGold 3 ปีที่แล้ว

    Thanks you! However for FireFox, the Options class does not have add_experimental_options method defined, through which we pass on the debuggerAddress and it's value 127.0.0.1:9014 in case of Chrome.

    • @Jerometk
      @Jerometk 2 ปีที่แล้ว

      Were yoi able to do it on firefox?

    • @kanakTheGold
      @kanakTheGold 2 ปีที่แล้ว

      @@Jerometk nope, the solution here is pertinent only to chrome, the mentioned options just do not exist for Firefox. Nor could I find a solution from elsewhere.

    • @akhandpathi7461
      @akhandpathi7461 ปีที่แล้ว

      @@kanakTheGold Same. I am trying to find too. No luck. Please let us know if you find.

  • @abhijithj1665
    @abhijithj1665 3 ปีที่แล้ว

    How do we achieve this with mozilla firefox . Kindly help

  • @alltimehits3759
    @alltimehits3759 3 ปีที่แล้ว

    why so much green screens

    • @cosmocode5065
      @cosmocode5065 3 ปีที่แล้ว

      Sorry for the bad experience. Back then I did not have good equipment and hardware to record.

  • @Jerometk
    @Jerometk 3 ปีที่แล้ว

    I'm not able to make it work with firefox

  • @sush6556
    @sush6556 3 ปีที่แล้ว

    hi how can we do the same with ruby in ubuntu

    • @cosmocode5065
      @cosmocode5065 3 ปีที่แล้ว

      Hi, unfortunately I do not have experience with Ruby. However I think you can follow the same steps, just write the corresponding Ruby code by referring the Java/Python example here.

  • @jakshshaks3000
    @jakshshaks3000 3 ปีที่แล้ว

    Do you know how to do it on Opera?

  • @DevSquared49
    @DevSquared49 3 ปีที่แล้ว

    Thanks !

    • @cosmocode5065
      @cosmocode5065 2 ปีที่แล้ว

      Thank you. Sorry for the late response.

  • @prathibareddy4736
    @prathibareddy4736 3 ปีที่แล้ว

    Thanks anna . You gave a clear picture .

  • @codestudio497
    @codestudio497 3 ปีที่แล้ว

    everything set up correctly but it open a new browser everytime i run the code

  • @rajeevranjan8482
    @rajeevranjan8482 3 ปีที่แล้ว

    Why u stopped making video ?

    • @cosmocode5065
      @cosmocode5065 3 ปีที่แล้ว

      I moved to another country and currently not getting enough time :( . I am planning to resume this works this year.

  • @avelinosarmiento705
    @avelinosarmiento705 3 ปีที่แล้ว

    Is it possible to connect to existing browser for edge?

    • @cosmocode5065
      @cosmocode5065 3 ปีที่แล้ว

      Latest edge is also based on chromium so the similar approach should work there. Unfortunately I have not got chance to try it.

  • @christoherright6430
    @christoherright6430 3 ปีที่แล้ว

    GOD bless you. This is what exactly I looking for.

  • @gentleberry185
    @gentleberry185 3 ปีที่แล้ว

    pls help. I made user directory in cmd as shown. the folder is created in c drive. but when I try to access it from new Google chrome by entering 127.0.0.1:9222 , it's showing site cannot be reached and 127.0.0.1 refused to connect