This is my solved question on Selenium click Element in desktop view: stackoverflow question
In mobile view I tried the same iframe
switch, now commented out, in order to .click()
selenium element:
// utilities.desktop.Driver.getDriver().switchTo().defaultContent(); // you are now outside both frames
// utilities.desktop.Driver.getDriver().switchTo().frame(zahlungPage.oneKlarna_fixedsum_bestätigung_frameElement);
// Thread.sleep(2000);
wait.until(ExpectedConditions.visibilityOf(zahlungPage.oneKlarna_ratenkauf_6));
zahlungPage.oneKlarna_ratenkauf_6.click();
This Element does not appear in Selenium:
@FindBy(xpath = "//input[@value='fixedsumcredit_kp']")
public WebElement oneKlarna_ratenkauf_6;
present in HTML as follows:
<input id="-0198e3aa-d2b1-46ce-bdf0-192e60662cd3-fixedsumcredit_kp" type="radio" name="-0198e3aa-d2b1-46ce-bdf0-192e60662cd3" value="fixedsumcredit_kp" style="height: 100%; opacity: 0; position: absolute; width: 100%; top: 0px; left: 0px; z-index: 1; cursor: pointer; -webkit-tap-highlight-color: rgba(255, 255, 255, 0);">
error in console is this:
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of Proxy element for: DefaultElementLocator 'By.xpath: //input[@value='fixedsumcredit_kp']' (tried for 10 second(s) with 2000 milliseconds interval)
Anybody an idea what to try next in mobile view of the webshop in order to click the element similar to the click in desktop view?