I'm trying to switch frame to email body, but it's not working.
I'm not able to switch frames.
Expectation:
I need to open yopmail
and get a text
from second email.
Email - [email protected]
public Password() {
public static void main(String[] args) System.setProperty("webdriver.chrome.driver","C:\\Browsers\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.findElement(By.xpath("//input[@class='ycptinput']")).sendKeys("Secondemail1234");
driver.findElement(By.xpath("//input[@type='submit']/..//i")).click();
int i = 0 ;
driver.switchTo().frame(i);
WebElement total= driver.findElement(By.xpath("(//div[@class='lms'])[2]"));
total.click();
driver.switchTo().frame(driver.findElement(By.xpath("//*[@id='ifmail']"))); //not working to switch to iframe
driver.switchTo().frame(1); ///not working with index
driver.switchTo().frame("ifmail"); // not working
here only I need to switch to frame -- to email body frame I need to switch.