java - how to handle dynamically changing iframe id using selenium webdriver -
but did not work for me Also tried Anyone can help me please If you Try to mention the IFrame Src attribute in this ur xpath declaration. This is working for me like the following: iframe id = pngNewCase1143241142570_iframe , this id dynamically changes every time. How do I < Strong> Selenium WebDriver Java I tried to use
driver. SwitchTo (). Frame (driver.findElement (By.xpath ("Xrath's iframe changes dynamically"))); . Driver.switchTo () defaultContent ();
driver.switchTo (). Frame (driver.findElement (by .id ("pngNewCase1143241142570_iframe"))); . Driver.switchTo () defaultContent ();
WebElement frame = driver.findElement (By.xpath ("// iframe [@ src = 'showNewClaimForm.action']"); Driver. SwitchTo (). Frame (frame);
Comments
Post a Comment