JS MouseOver

 



describe('',function(){
it('',function(){
browser.ignoreSynchronization = true;
browser.get("https://www.wikipedia.org/");
//predicive search-selection
browser.actions().mouseMove(element(by.name('search')).sendKeys('INDIA')).perform();
browser.actions().sendKeys(protractor.Key.ARROW_DOWN).perform();
browser.actions().sendKeys(protractor.Key.ENTER).perform();
browser.element(by.id('firstHeading')).getText().then(function(text){
console.log(text);
expect(text).toBe('India');
})



});
});




const { browser, element, protractor } = require("protractor")

describe('',function(){
it('',function(){
browser.waitForAngularEnabled(false);
browser.get('https://www.wikipedia.org/');
browser.actions().mouseMove(element(by.id('searchInput'))).sendKeys('INDIA').perform();
browser.actions().sendKeys(protractor.Key.ARROW_DOWN).perform().then(function(){
browser.sleep(5000);
});
browser.actions().sendKeys(protractor.Key.ENTER).perform();
})

})

Comments

Popular posts from this blog

Implicit and Explicit Waits,FluentWait,PageLoadTimeOut

A Interview Questions- selenium