I have homePage.rb (using Ruby page object. Selenium-webdriver gem) file that navigate to the website, click the Login link that open a modal dialogue window. Now I want to click a link 'Register' on this modal dialogue window. But it giving an error message that 'NoSuchElement'.
In the page source, this modal dialogue window is not a frame, not a window, not an alert but form. this form is available inside nested div. See following code and attached image:
<div id="MSXLayer" style="display: block; height: 250px; margin-left: -252.5px; margin-top: -125px; top: 50%; width: 505px;">
<div class="layerLoad" style="display: none;"></div>
<a class="closeLayer" href="closeLayer" style="display: inline;">×</a>
<div class="content">
<div id="MSXLayerContent" style="display: block;">
<div id="LoginForm" class="floatLeft">
<div class="grid grid6">
<h3>Log in</h3>
<p>If you are already a Mister Spex customer, your contact details will be automatically filled in. </p>
</div>
<input type="hidden" value="03c51fa2d21e7ff3b37923cfbe0533ea7611102aec8ab462b543a4bcdbf9158c" name="SynchronizerToken">
<div class="floatLeft grid grid6">
<div class="floatLeft grid grid6">
<div class="grid grid5">
<button class="green grid grid3 gridRight txtCenter" name="login" value="login" data-icon="" type="submit">Login</button>
<br>
New Customer?
</div>
</form>
</div>
</div>
</div>
</div>