Robot Framework, Selenium2Library two field with same id

289 views Asked by At

I am on a page and it has email field with id="Email" and on that page it has a link. When I click that link then pop up window appears and it too have Email field with id="email".

I want to assert the placeholder of first email field but it is asserting the placeholder of send email field. Placeholder value is different in both email field.![enter image description here][1]

2

There are 2 answers

0
janne On

You can use keyword Select Window to choose a particular window for context of subsequent keywords.

0
Nilamber Singh On

use switchTo().window() to switch to different windows and work with it.