import org.openqa.selenium.Keys as Keys
1.WebUI.openBrowser(’’)
2.WebUI.maximizeWindow()
3.WebUI.navigateToUrl(GlobalVariable.url_base + ‘helpmeplease’)
4.WebUI.click(findTestObject(‘TestDomainPage/Video/vast_playbutton’))
5.WebUI.sendKeys(null, Keys.chord(Keys.TAB))
6.WebUI.sendKeys(null, Keys.chord(Keys.ENTER))
7.WebUI.switchToWindowIndex(1)
Error on 5 step: Unable to send keys ‘’ to object
I just want press (TAB + ENTER) without some fields, findingtestobjects etc.
Last time I’am using robot.KeyPress but ChromeHeadless didnt understand that new tab is opened after TAB+ENTER (but link from video was opened), and driver Cannot find window with index: ‘1’
What I need to do? I’m trying 5 step like a 3 weeks in a row with many methods, but nothing works.
P.S.
- Using robot works in Chrome (TestCase Passed)
- Using robot doesnt work in ChromeHeadless (TestCase FAILED)
- SendKeys doesnt work in both browsers (TestCase FAILED)