Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to take selenium webdriver control inside below java script to click on text box
    primarykey
    data
    text
    <p>Que: How to take selenium webdriver control inside below java script to click on text box </p> <p>Need to bring the selenium webdriver control with in Java script then click on the text box click on the text box "input id="div_4_1_1_1_1_1_2-in"" and enter value inside that</p> <pre><code> &lt;script type="text/javascript"&gt; &lt;div id="mainBody" class="body main-content" aria-label="(N002A) No customer" role="complementary" style="padding-top: 50px;"&gt; &lt;div id="Tabs1" class="Tabs topLevel CoachView tab-content CoachView_show" data-eventid="" data-viewid="Tabs1" data-config="config14" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.Tabs"&gt; &lt;div id="Validation_Errors1" class="Validation_Errors topLevel CoachView CoachView_show" data-eventid="" data-viewid="Validation_Errors1" data-config="config24" data-bindingtype="ValidationError[]" data-binding="local.validationErrors[]" data-type="com.ibm.bpm.coach.Snapshot_4f1d8c7c_e32f_44e6_97c3_48661f7ae3b9.Validation_Errors"&gt;&lt;/div&gt; &lt;div id="Feedback1" class="Feedback topLevel CoachView CoachView_show" data-eventid="" data-viewid="Feedback1" data-config="config18" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.Feedback"&gt; &lt;div id="Form_Scope1" class="Form_Scope topLevel CoachView CoachView_show" data-eventid="" data-viewid="Form_Scope1" data-config="config2" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.Form_Scope"&gt; &lt;form&gt; &lt;div id="div_4_1" class="ContentBox" data-view-managed="false"&gt; &lt;div id="div_4_1_1" class="Fieldset CoachView CoachView_show" data-eventid="" data-viewid="Fieldset1" data-config="config26" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.Fieldset"&gt; &lt;fieldset&gt; &lt;div class="row-fluid"&gt; &lt;div id="div_4_1_1_1" class="ContentBox" data-view-managed="false"&gt; &lt;div id="div_4_1_1_1_1" class="span6 CoachView_show" data-eventid="" data-viewid="Fieldset_Column1" data-config="config28" data-bindingtype="" data-binding="" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.Fieldset_Column"&gt; &lt;div id="div_4_1_1_1_1_1" class="ContentBox" data-view-managed="false"&gt; &lt;div id="div_4_1_1_1_1_1_1" class="ListSingle CoachView CoachView_show" data-eventid="" data-viewid="ListSingle1" data-config="config25" data-bindingtype="BpmCustomerSearchScope" data-binding="local.customerRegion" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.ListSingle"&gt; &lt;div id="div_4_1_1_1_1_1_2" class="String CoachView CoachView_show" data-eventid="" data-viewid="String1" data-config="config22" data-bindingtype="String" data-binding="local.customerSearchExpression" data-type="com.ibm.bpm.coach.Snapshot_335ceb1a_da60_46fc_818c_04701f47d154.String"&gt; &lt;div class="w-string w-group clearfix"&gt; &lt;div class="p-label-container span4"&gt; &lt;div class="p-fields-container span8"&gt; &lt;input id="div_4_1_1_1_1_1_2-in" class="p-field span12" type="text"&gt; &lt;div class="p-field" style="display: none;"&gt;&lt;/div&gt; &lt;div class="p-help-block"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Note : i have tried below different methods to try.</p> <pre><code> //driver.switchTo().frame(driver.findElement(By.tagName("iframe"))); // driver.switchTo().frame(driver.findElement(By.id("mainBody"))); //driver.switchTo().frame(driver.findElement(By.cssSelector("iframe[title='Fill Quote']"))); // System.out.println("*****Frame handed*******"); // driver.findElement(By.id("mainBody")).click(); // Thread.sleep(30000); //driver.switchTo().frame(0); </code></pre> <p>Output : Output : </p> <p>Started InternetExplorerDriver server (32-bit) 2.37.0.0 Listening on port 10809 Nov 20, 2013 2:39:37 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed Nov 20, 2013 2:39:37 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute INFO: Retrying request <strong>*<em>Going for frame handing</em>**<em>*</em></strong> <em><strong></em>*Focus on main body*<em>*</em>*</strong> FAILED: testQTO02 org.openqa.selenium.NoSuchElementException: Unable to find element with id == div_4_1_1_1_1_1_2-in (WARNING: The server did not provide any stacktrace information)</p>
    singulars
    1. This table or related slice is empty.
    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