Selenium fails to locate the iframe by ID and Name.
ID
Name
This is for an automated checkout test on Shopify. The specific issue lies within the p
My solution was to look for keywords that are the exact same for different dynamic id's. In this case, it was "card-fields-name". I did this by using the XPath locator.
driver.switchTo().frame(driver.findElement(By.xpath("//iframe[contains(@id,'card-fields-number')]")));