Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle 2 iframes with same class name
    primarykey
    data
    text
    <p>Header section editor</p> <pre><code>&lt;iframe class="wysihtml5-sandbox" width="0" height="0" frameborder="0" security="restricted" allowtransparency="true" marginwidth="0" marginheight="0" style="display: inline-block; min-height: 160px;;"&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;body class="wysihtml5-editor" contenteditable="true" spellcheck="true" style="overflow: hidden; min-height: 0px; background-color:;: rgb(255, 255, 255"&gt; &lt;/html&gt; &lt;/iframe&gt; &lt;/div&gt; &lt;div class="p-help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Footer section editor</p> <pre><code>&lt;iframe class="wysihtml5-sandbox" width="0" height="0" frameborder="0" security="restricted" allowtransparency="true" marginwidth="0" marginheight="0" style="display: inline-block; min-height: 160px; background-color: rgb(255, 255, 255&gt; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;body class="wysihtml5-editor" contenteditable="true" spellcheck="true" style="overflow: hidden; min-height: 0px; background-color: rgb(255, 255, 255"&gt; &lt;/html&gt; &lt;/iframe&gt; &lt;/div&gt; &lt;div class="p-help-block"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>i can able to enter the text in the header section editor by below code</p> <pre><code>driver.findElement(By.id("div_1_1_3_1_3_1_2_1_1_1_1")) ; driver.switchTo().frame(driver.findElement(By.className("wysihtml5-sandbox"))); System.out.println("inside the header frame"); driver.findElement(By.className("wysihtml5-editor")).sendKeys("header section quote approval details"); </code></pre> <p>Thread.sleep(10000); System.out.println("entered text inside header frame");</p> <p>but webdriver control is not navigating to the footer section editor to enter the text be below code i tried</p> <pre><code>driver.findElement(By.id("div_1_1_3_1_2_1_1_1_1_1_4-in")).click(); Thread.sleep(5000); System.out.println("inside the footer frame"); Thread.sleep(10000); driver.findElement(By.className("wysihtml5-editor")).sendKeys("footer section quote approval details"); System.out.println("entered text inside footer frame"); </code></pre> <p>Note : please let me know the solution for this as i am facing same issue in many phases in my application which i am doing automation using selenium webdriver</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload