title: Selenium Webdriver - Unable to find element after page refresh/redirect
body: <p>I am trying to write some UI test cases for an SAP-webUI (web based) application. After login, it shows the dashboard ( Workcenter's ) screen.</p>
  
  <p>Now the problem is, I am able to open the page, enter U/N, Pwd and login through Selenium. After i press the "Login" button the URL changes and the page got redirected/refreshed.</p>
  
  <p>E.g. URL before login : <a href="https://a/b/c/d/e/f/g.htm?sap-client=001&amp;sap-sessioncmd=open">https://a/b/c/d/e/f/g.htm?sap-client=001&amp;sap-sessioncmd=open</a></p>
  
  <p>E.g. URL after successful Login : <a href="https://a/b(bDsdfsdsf1lg==)/c/d/e/f/g.htm">https://a/b(bDsdfsdsf1lg==)/c/d/e/f/g.htm</a></p>
  
  <p>After this im unable to perform any action or press any link in any part of the page. I tried with all the possible attributes ( css, xpath, id ). Webdriver was unable to find any element on the page. It shows the error "No element found" alone.</p>
  
  <p>I am using java with Selenium Web Driver.</p>
  
  <p>Please find the html structure of the webpage below</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;&lt;div&gt;&lt;div&gt;&lt;iframe&gt;#document&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;frameset&gt;&lt;frameset&gt;&lt;frame&gt;#document&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;form&gt;&lt;div&gt;&lt;div&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a id=abcdef&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;&lt;/frame&gt;&lt;/frameset&gt;&lt;/frameset&gt;&lt;/html&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Actually i want to click a linkmenu "abcd", which is inside iframe and frame as shown in the below HTML code</p>
  
  <p><code>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;iframe name=a1&gt;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;frameset&gt;&lt;frameset name=fs1&gt;&lt;frame name=f1&gt;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;a id=abcdef&gt;</code></p>
  
  <p>I tried the below code as well.</p>
  
  <p><code>driver.switchTo().frame("a1");
  driver.findElement(By.id("abcd")).click();</code></p>
  
  <p>OR</p>
  
  <p><code>driver.findElement(By.xpath("//*[@id='abcd']")).click();</code></p>
  
  <p>After using the above code, still im getting the error "No such element"</p>
  
  <p>Kindly suggest</p>
  
  <p>Regards,
  Siva</p>