0
votes

I want to write a testcase for a webapplication with Robot framework and the selenium library. The situation is that when a button is clicked, a popup page is shown withtin the webpage. This popup is inside an iframe and has it's own etc.

I have a test that verifies if the popup page is opened by searching for presence element x.

Things I have tried are:

1a. Select frame xpath=xpath iframe

1b. Element text should be xxx

2a. Switch window title=title of popup that can be found within the element.

2b. Element text should be xxx

In both situations the test fails. The popup page is opened but the error messages shown are:

  • Element with locator 'iframe' not found.
  • Unable to locate window with title 'xxx'.

I searched for similar problems but didn't find any solutions thats helps my case.

1

1 Answers

0
votes

try this

Select Frame    css:iframe[id^="PopupBoxIframe_"]

where id=yourid

to get back lateron you use

unselect frame