Unable to move focus using Action class in selenium webdriver
<p><a href="https://i.stack.imgur.com/exFkc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/exFkc.png" alt="enter image description here"></a>Hello I am working with popup which are made by 
So while I click on one button i.e. "click1" it pops up one div window ..
So on this pop up I can play with element by using action class </p>

<pre><code>WebElement element = wd.findElement(By.className("qx-window"));
Actions actions = new Actions(wd);
actions.moveToElement(element).click().perform();
</code></pre>

<p>Now from this popup while i click on another button it again pops up another popup and again I tried with action class but unable to set focus on the new pop up </p>

<p>So scenario is main window->popup->popup</p>

<p>can I able to remove focus from first pop up </p>

<p>Hear below selenium code is not working that's why I use action </p>

<pre><code>for (String popup : wd.getWindowHandles())
{
wd.switchTo().window(popup);
}
</code></pre>