Ashish
Ashish

Reputation: 13

Selenium Robot Framework Pop Up Access

I am not able to access a pop up window using selenium webdriver robot framework.

Steps:

  1. site "http://carlightking.com/"
  2. click on "Search By Vehicle" Tab.\
  3. pop up window opens

I tried to access the pop up using "select window" keyword with some locators like id and name but was unsuccessful. It shows

ValueError: Window locator with prefix 'id' is not supported.

How can I select this pop up window and access elements over it?

Upvotes: 0

Views: 4810

Answers (1)

Vivi
Vivi

Reputation: 431

The Problem is that the popup is inside a iFrame.

<iframe id="popup_selector" src="//carlightking.com/selector/selector-home-popup.php" width="100%"></iframe>

hence you have to explicitly select the iframe first

*** Test Case ***
CarLightKing
        Open Browser    http://carlightking.com/
        Wait Until Page contains Element            link=Search by Vehicle        5s
        Click Element           link=Search by Vehicle 
        Select Frame            id=popup_selector

Upvotes: 2

Related Questions