I am trying to locate a tag on a page, but so far finding it by name/id/xpath have not worked. This is what I’ve tried to locate it by xpath:
db = driver.find_element_by_xpath("/html/body/form")
and also
driver.find_element_by_xpath("//form[@id='formControl']")
Both of these return the error:
selenium.common.exceptions.NoSuchElementException: Message: u'Unable to locate element:
It’s as if it can not find the form on the page. Any ideas of how to fix?
Here’s the beginning of the html on the page:
<html>
<body id="bodyControl" class="PersonalizationPage ContentPage Layout_PageUsesRegions" onunload="closeTimeoutWarningPopupWindow();return true;" onload="return __MasterOnLoad();" onresize="return __MasterOnResize();">
<form name="formControl" method="post" action="default.wl?appflag=65.14&bhcp=1&MT=208&rs=LAWS2.0&strRecreate=no&sv=Split&transfertoken=10281204301250d0dbca913e4aa6887c7d425f4ede9c&vr=2.0" id="formControl" target="_top">
Try this.
And two things: