switchToIframe uses 'name' as reference instead of 'id'
jfassembly opened this issue · comments
jfassembly commented
The current implementation of switchToIframe
is using name
instead of id
. This behavior is not abiding by the W3C specification, which requests for id
to be used.
Would you be open to adapt the behavior? I can whip a short PR to get this compliant.
Oleg Andreyev commented
@jfassembly Thanks for bringing this up.
’switchToIframe’ is not a direct implementation of W3C Specification, its a wrapper over php-webdriver. If you go to php-webdriver and take a look at lib/Remote/RemoteTargetLocator.php you'll notice that it's using ID so is compliant with W3C.
Probably it worth implementing a second version of ’switchToIframe’ that will search element by id (attribute)