title: How to find visible element and perform click action in robot framework?
body: <p>I have one window on which i have four links</p>
  
  <ol>
  <li><p>Exit Button Link - <code>&lt;a id="exitBtn" class="x-btn questionpreview_exitbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 0px; top: 0px; margin: 0px;"&gt;</code></p></li>
  <li><p>Submit button Link - <code>&lt;a id="submitBtn" class="x-btn questionpreview_submitbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 864px; top: 0px; margin: 0px;"&gt;</code></p></li>
  <li><p>Back Button Link - <code>&lt;a id="prevBtn" class="x-btn questionpreview_backbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 733px; top: 0px; margin: 0px; display: none;"&gt;</code></p></li>
  <li><p>Review Button Link - <code>&lt;a id="reviewBtn" class="x-btn questionpreview_reviewbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 798px; top: 0px; margin: 0px; display: none;"&gt;</code></p></li>
  </ol>
  
  <p>Out of these five button only two button (Exit and Submit) are visible on first window. When I click on submit button having using this locator:</p>
  
  <pre><code>xpath=//*[contains(text(),'Question Preview')]/ancestor::div[6]//div[@id="previewWindow-body"]//div[@id="preview-top-container"]//*[contains(text(),'Submit')]/ancestor::a`
  </code></pre>
  
  <p>it works and the next window opens. On next window submit button gets hidden and it shows exit, back and Review button</p>
  
  <p>They look like this</p>
  
  <ol>
  <li><p>Exit button - <code>&lt;a id="exitBtn" class="x-btn questionpreview_exitbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 0px; top: 0px; margin: 0px;"&gt;</code></p></li>
  <li><p>Back Button - <code>&lt;a id="prevBtn" class="x-btn questionpreview_backbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 798px; top: 0px; margin: 0px;"&gt;</code></p></li>
  <li><p>Review Button - <code>&lt;a id="reviewBtn" class="x-btn questionpreview_reviewbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-noicon x-btn-default-toolbar-small-noicon" tabindex="0" unselectable="on" hidefocus="on" style="right: auto; left: 863px; top: 0px; margin: 0px;"&gt;</code></p></li>
  </ol>
  
  <p>My question is when next window opens I could not click any or find any of these three buttons. I am using xpath for back button as
  <code>//*[contains(text(),'Back')]/ancestor::a[@id="prevBtn" and not(contains(@style,'display: none'))]</code> but it is not working.</p>