In my testing, one of the page is having “Submit” button and when i try to click on submit button is not working (not clicking) even though script is executed.
Below is the HTML code for the submit button
<button class="btn btn-primary" name="submit_button" value="1" type="submit"> <i class="fa fa-check"></i> Submit
I have written the scripts as like below to find submit button element.
time.sleep(6) sub = web.find_element_by_name("submit_button") sub.click()
I have tried to find element using “Xpath” (Absolute XPath and Relative XPath) as well and observed that did not work. one more thing is that,the accessible page is in “iframe”
and i have access that as like below
To confirm that whether the scripts is running or not i have modified above code as like below.
time.sleep(6) print ("hello") sub = web.find_element_by_name("submit_button") print ("hello1") sub.click() print ("hello2")
From above code i got know that scripts were executing successfully
Please guide me what is the issue?
Answers are much appreciable!
Source: Stack Overflow