// import the required modules from the library or handling popups in Selenium //
 
import { browser, element, by, ExpectedConditions, protractor} from 'protractor'
 
import { Alert } from 'selenium-webdriver';
 
var script = require (‘protractor’) ;
 
var webdriver = require (‘selenium-webdriver’) ;
 
var myAlert = new Alert();
 
// defining the Selenium test automation scenario for the use case in protractor for or handling popups in Selenium//
 
describe(' Protractor Javascript Selenium Alert Test ', function() {
    browser.ignoreSynchronization = true; // disable synchronization //
 
// it contains information about the Selenium test automation case for or handling popups in Selenium//   
    it(' Hidden Division Alert types in Protractor ', function() {
// set the wait timeout to 10 secs //
        browser.manage().timeouts().implicitlyWait(10000)
        browser.get("http://the-internet.herokuapp.com ");
        element(by.className("cd-popup-trigger")).click()
        element(by.xpath("//input[@type='text']")).sendKeys(" Protractor hidden division alert in Test ")
// adding sleep for validation purposes //
        browser.sleep(5000);
    });
});