'PHP WebDriver cant select iframe for login

I am making script that will login to "https://asia.nikkei.com/". The script opens the login window which is in a iframe.

But then iam not able to select <inputs> for email and password. And when I try to switchTo iframe with id "piano-id-AciFE", I'm getting "no such frame" error using this code:

$driver->switchTo()->frame("piano-id-AciFE");

I tried another solution with:

$username = $driver->switchTo()->activeElement();

after the login window open, but this solution doesnt work either.

Is there any way to select login input in this case?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source