Cannot click Submit Button

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Cannot click Submit Button

Small World
There are five Dialog boxes and each Dialog box has the same code for the Submit Button except the value changes for "id" and "onclick".
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<div class="modal-footer">
                                    <input type="button" id="3118" class="btn btn-danger RejectionModal" value="Decline">
                                    <input type="button" id="btnSubmit_3118" style="opacity: 1;" onclick="submitObservation(3118,653);" class="btn btn-primary review-submission" value="Submit">

                                </div>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


The code which I used to click the Submit button 

JavascriptExecutor executor1 = (JavascriptExecutor)driver;

 WebElement element1 = driver.findElement(By.xpath("//*[contains(@class,'btn btn-primary review-submission') and contains(@style,'opacity: 1;')]"));
  
 executor1.executeScript("arguments[0].click();", element1); 


The above code works fine for the First Submit button but not for the rest.

Thanks & Regards,
Small World

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b308cb8a-7189-4367-a638-64787e4f723do%40googlegroups.com.