i am trying to add text in summer note text area but an exception is generated i have tried many method like relative and absolute xpath and class for web element but no one is working
Thread.sleep(3000);
driver.findElement(By.xpath("//div[contains(@class,'note-editable panel-body')]")).sendKeys("test");
/*
driver.findElement(By.xpath(".//*[@id='addTaskFrm']/div[2]/div/div/div/div[3]/div[3]")).sendKeys("test");
*/
/*
driver.findElement(By.xpath("html/body/div[96]/div/div/form/div[2]/div/div/div/div[3]/div[3]")).sendKeys("test");
*/
/*(WebDriverWait wait = new WebDriverWait(driver, 90);// 1 minute
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("note-editable panel-body")));
driver.findElement(By.className("note-editable panel-body")).sendKeys("cancel");*/
HTML code for summer note is
<div class="modal-body">
<div class="row">
<div class="col-xs-12 m-t-md">
<input id="note-title" name="name" value="Cancel Task" type="hidden">
<textarea id="modal-quick-note" class="form-control modal-description-box" name="description" rows="5" placeholder="Description" style="display: none;"></textarea>
<div class="note-editor note-frame panel panel-default">
<div class="note-editing-area">
<div class="note-handle">
<div class="note-control-selection" style="display: none;">
<div class="note-control-selection-bg"></div>
<div class="note-control-holder note-control-nw"></div>
<div class="note-control-holder note-control-ne"></div>
<div class="note-control-holder note-control-sw"></div>
<div class="note-control-sizing note-control-se"></div>
<div class="note-control-selection-info"></div>
</div>
</div>
<textarea class="note-codable"></textarea>
<div style="position: absolute; left: -100000px; opacity: 0;" contenteditable="true"></div>
<div class="note-editable panel-body" style="height: 235px;" contenteditable="true">
<p>
<p>
Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible
Aucun commentaire:
Enregistrer un commentaire