Hi, I am working on a test case where the action is to perform a click inside a nested iframe. I have used the following to make an action inside a single iFrame and it works.
Click //iframe[@id="iframe1] >>> //button[@name=“Ok”]
Now in another case there is a nested iframes , I tried using the following but it does not work. I was unable to find any discussions or methods that could help me
Click //iframe[@id="iframe1] >>> //iframe[@id="iframe2] >>> //iframe[@id=“iframe3”] >>> //button[@name=“Ok”]
Any help would be appreciated?
That should work, at least it works in Browser library acceptance tests.
Yes it worked, the issue seemed to be with the selector, my first iframe xpath selector was something like this
(//iframe[contains(@name,“privateN”])[1] >>>
Changing it to fixed the issue, so seems indexing the xpath (adding [1]) maybe the cause here
//iframe[contains(@src,“auth”)] >>>
1 Like