Skip to content

CosmoCode (Formerly TeachMeSelenium)

DevOps tutorials | Test Automation tutorials

CosmoCode (Formerly TeachMeSelenium)

MENUMENU
  • Home
  • Selenium Tutorials
    • 0. Beginners, start here
    • 1. System Setup
      • Installing programming language dependencies
      • Installing Selenium dependencies
    • 2. First selenium script
      • Create a new project and include dependencies
      • Writing and running code
    • 3. Identifying elements in the page
      • Inspect attributes like id, class, name etc of an element
      • Introduction to XPath locators
      • XPath functions
      • CSS Selectors
    • 4. Interacting with the Elements in the page
      • Locating element by using findElement
      • Performing actions like click, type, select etc
      • Getting the list of elements and Child Element
    • 5. Waits
      • Implicit Wait
      • Explicit wait
    • 6. Handling Alert dialog, Popup windows and Frames
      • Handling Alert dialog
      • Handling Popup windows
    • 7. Interacting with the Browser
      • Running test on different browsers
      • Taking the screenshot of the page
      • Executing JavaScript through JavascriptExecutor
    • 8. Advanced User Interactions
      • Introducing Actions and moving the mouse over an element
      • Performing drag and drop operations
      • Automating Keyboard press events
    • 9. Selenium Grid
      • Introduction to Selenium Grid & Setting up hub and nodes
      • RemoteWebDriver and DesiredCapabilities
      • Running tests on SauceLabs' cloud machines
    • 10. Selenium Pro Tips
      • How to connect Selenium to an existing browser that was opened manually?
      • How to disable insecure password warning in Firefox for Selenium?
      • WebDriver Exceptions
      • How to interact with shadow DOM in Selenium?
    • > Click here to watch Video Tutorials
    • > TestNG - a testing framework
      • TestNG | Introduction & Setup
  • JavaScript Tutorials
    • Object-oriented programming in JavaScript
      • Introduction to Object Oriented Programming | JavaScript & Object Oriented Programming | Part 1
      • Setting up environment | JavaScript & Object Oriented Programming | Part 2
      • Object Literals | JavaScript & Object Oriented Programming | Part 3
      • Deep dive into Object Literals | JavaScript & Object Oriented Programming | Part 4
      • Factory Functions | JavaScript & Object Oriented Programming | Part 5
      • Constructor Functions | JavaScript & Object Oriented Programming | Part 6
      • Built-in Constructor Functions in JavaScript | JavaScript & Object Oriented Programming | Part 7
      • How to implement Abstraction in JavaScript | JavaScript & Object Oriented Programming | Part 8
      • Adding, removing and iterating Object Properties | JavaScript & Object Oriented Programming | Part 9
      • Getters and Setters in JavaScript | JavaScript & Object Oriented Programming | Part 10
      • Prototypes in JavaScript | JavaScript & Object Oriented Programming | Part 11
    • Understanding var, let and const in JavaScript
  • More
    • Automation Practice | Beginner
    • Automation Practice | First Selenium Script
    • Automation Practice | Handling Waits
    • Automation Practice | WebTable
  • About Us
MENUMENU
  • Home
  • Selenium Tutorials
    • 0. Beginners, start here
    • 1. System Setup
      • Installing programming language dependencies
      • Installing Selenium dependencies
    • 2. First selenium script
      • Create a new project and include dependencies
      • Writing and running code
    • 3. Identifying elements in the page
      • Inspect attributes like id, class, name etc of an element
      • Introduction to XPath locators
      • XPath functions
      • CSS Selectors
    • 4. Interacting with the Elements in the page
      • Locating element by using findElement
      • Performing actions like click, type, select etc
      • Getting the list of elements and Child Element
    • 5. Waits
      • Implicit Wait
      • Explicit wait
    • 6. Handling Alert dialog, Popup windows and Frames
      • Handling Alert dialog
      • Handling Popup windows
    • 7. Interacting with the Browser
      • Running test on different browsers
      • Taking the screenshot of the page
      • Executing JavaScript through JavascriptExecutor
    • 8. Advanced User Interactions
      • Introducing Actions and moving the mouse over an element
      • Performing drag and drop operations
      • Automating Keyboard press events
    • 9. Selenium Grid
      • Introduction to Selenium Grid & Setting up hub and nodes
      • RemoteWebDriver and DesiredCapabilities
      • Running tests on SauceLabs' cloud machines
    • 10. Selenium Pro Tips
      • How to connect Selenium to an existing browser that was opened manually?
      • How to disable insecure password warning in Firefox for Selenium?
      • WebDriver Exceptions
      • How to interact with shadow DOM in Selenium?
    • > Click here to watch Video Tutorials
    • > TestNG - a testing framework
      • TestNG | Introduction & Setup
  • JavaScript Tutorials
    • Object-oriented programming in JavaScript
      • Introduction to Object Oriented Programming | JavaScript & Object Oriented Programming | Part 1
      • Setting up environment | JavaScript & Object Oriented Programming | Part 2
      • Object Literals | JavaScript & Object Oriented Programming | Part 3
      • Deep dive into Object Literals | JavaScript & Object Oriented Programming | Part 4
      • Factory Functions | JavaScript & Object Oriented Programming | Part 5
      • Constructor Functions | JavaScript & Object Oriented Programming | Part 6
      • Built-in Constructor Functions in JavaScript | JavaScript & Object Oriented Programming | Part 7
      • How to implement Abstraction in JavaScript | JavaScript & Object Oriented Programming | Part 8
      • Adding, removing and iterating Object Properties | JavaScript & Object Oriented Programming | Part 9
      • Getters and Setters in JavaScript | JavaScript & Object Oriented Programming | Part 10
      • Prototypes in JavaScript | JavaScript & Object Oriented Programming | Part 11
    • Understanding var, let and const in JavaScript
  • More
    • Automation Practice | Beginner
    • Automation Practice | First Selenium Script
    • Automation Practice | Handling Waits
    • Automation Practice | WebTable
  • About Us

Handling Alert dialog, Popup windows and Frames

Handling Alert dialog, Popup windows and Frames | Handling Popup windows

In the Previous Tutorial, we learned how to handle the Alert window. In this tutorial, we will learn to handle popup windows. We’ll write code to switch over multiple browser windows and perform some actions on them. As we can see on  Automation Practice page, there is a link Click Me to open New Window. If we click on …

Read moreHandling Alert dialog, Popup windows and Frames | Handling Popup windows

Handling Alert dialog, Popup windows and Frames | Handling Alert dialog

In the Previous Tutorial, we learned how to handle timeout issues in Selenium. In this tutorial, we will learn how to handle Alert windows. What is an Alert window? You must have noticed that on clicking some links/buttons, the page displays an alert window that asks the user to confirm if she or he wants to …

Read moreHandling Alert dialog, Popup windows and Frames | Handling Alert dialog

© 2023 CosmoCode (Formerly TeachMeSelenium) • Built with GeneratePress
  • Home
  • Selenium Tutorials
    • 0. Beginners, start here
    • 1. System Setup
      • Installing programming language dependencies
      • Installing Selenium dependencies
    • 2. First selenium script
      • Create a new project and include dependencies
      • Writing and running code
    • 3. Identifying elements in the page
      • Inspect attributes like id, class, name etc of an element
      • Introduction to XPath locators
      • XPath functions
      • CSS Selectors
    • 4. Interacting with the Elements in the page
      • Locating element by using findElement
      • Performing actions like click, type, select etc
      • Getting the list of elements and Child Element
    • 5. Waits
      • Implicit Wait
      • Explicit wait
    • 6. Handling Alert dialog, Popup windows and Frames
      • Handling Alert dialog
      • Handling Popup windows
    • 7. Interacting with the Browser
      • Running test on different browsers
      • Taking the screenshot of the page
      • Executing JavaScript through JavascriptExecutor
    • 8. Advanced User Interactions
      • Introducing Actions and moving the mouse over an element
      • Performing drag and drop operations
      • Automating Keyboard press events
    • 9. Selenium Grid
      • Introduction to Selenium Grid & Setting up hub and nodes
      • RemoteWebDriver and DesiredCapabilities
      • Running tests on SauceLabs’ cloud machines
    • 10. Selenium Pro Tips
      • How to connect Selenium to an existing browser that was opened manually?
      • How to disable insecure password warning in Firefox for Selenium?
      • WebDriver Exceptions
      • How to interact with shadow DOM in Selenium?
    • > Click here to watch Video Tutorials
    • > TestNG – a testing framework
      • TestNG | Introduction & Setup
  • JavaScript Tutorials
    • Object-oriented programming in JavaScript
      • Introduction to Object Oriented Programming | JavaScript & Object Oriented Programming | Part 1
      • Setting up environment | JavaScript & Object Oriented Programming | Part 2
      • Object Literals | JavaScript & Object Oriented Programming | Part 3
      • Deep dive into Object Literals | JavaScript & Object Oriented Programming | Part 4
      • Factory Functions | JavaScript & Object Oriented Programming | Part 5
      • Constructor Functions | JavaScript & Object Oriented Programming | Part 6
      • Built-in Constructor Functions in JavaScript | JavaScript & Object Oriented Programming | Part 7
      • How to implement Abstraction in JavaScript | JavaScript & Object Oriented Programming | Part 8
      • Adding, removing and iterating Object Properties | JavaScript & Object Oriented Programming | Part 9
      • Getters and Setters in JavaScript | JavaScript & Object Oriented Programming | Part 10
      • Prototypes in JavaScript | JavaScript & Object Oriented Programming | Part 11
    • Understanding var, let and const in JavaScript
  • More
    • Automation Practice | Beginner
    • Automation Practice | First Selenium Script
    • Automation Practice | Handling Waits
    • Automation Practice | WebTable
  • About Us