Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I also met the same problem before and 'Element not found' problem is frequently happening in selenium.The possible causes to this problem are as follows:</p> <ol> <li><p>when you execute "click element",however the element has not show in the page,maybe its in the procedding of loading,then selenium will throw a exception: element not found.</p></li> <li><p>the element's identity is wrong,maybe a spelling error or the selenium does not support the identity way.</p></li> </ol> <p>I visited the website you tested,<a href="http://www.washingtonpost.com" rel="nofollow noreferrer">http://www.washingtonpost.com</a></p> <p>Test-Case recorded by <code>SeleniumIDE</code> always does not work when you export as Java.</p> <p>Here is my code:</p> <pre class="lang-java prettyprint-override"><code> public class Website extends SeleneseTestBase { @BeforeMethod public void setUp() throws Exception { selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.washingtonpost.com/"); selenium.start(); } @Test public void testWebsite() throws Exception { selenium.open("/"); waitFor("link=Sign In"); waitSecomd(3); selenium.click("link=Sign In"); selenium.waitForPageToLoad("60000"); selenium.type("name=MemberName", "adasf@gmail.com"); selenium.type("name=Password", "adfasd"); selenium.click("name=submit"); selenium.waitForPageToLoad("60000"); } @AfterMethod public void tearDown() throws Exception { selenium.stop(); } public void waitFor(String locator) throws Exception { for (int second = 0;; second++) { if (second &gt;= 60) fail("timeout"); try { if (selenium.isVisible(locator)) break; } catch (Exception e) {} Thread.sleep(1000); } } public void waitSecomd(int n) throws Exception { for (int second = 0;; second++) { if (second &gt;= 60) fail("timeout"); try { if (second &gt; n - 1) break; } catch (Exception e) {} Thread.sleep(1000); } } } </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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