Verify the text within a Popup box

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Verify the text within a Popup box

Richard Lewis
HI

I currently have a popup box appear with text in it when i hover over an icon ( In this case the letter I). I want to run a test to verify/confirm the text within this popup box. I have tried mouse over but it does not work? does any one have any solutions for this

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

softwaretestingforum
Administrator
Are you not able to bring up the pop up?
Can you try mouseDown and mouseUp method on it?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

Richard Lewis
Hi

Thanks for the suggestion, i have tried mouse up/down, the popup does not appear
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

softwaretestingforum
Administrator
I might be groping in dark, but this is one of those area of Selenium1 where you could do trial and error.
Try these methods and see if any one of these gets you through -

 void mouseDown(java.lang.String locator)
          Simulates a user pressing the left mouse button (without releasing it yet) on the specified element.

 void mouseDownAt(java.lang.String locator, java.lang.String coordString)
          Simulates a user pressing the left mouse button (without releasing it yet) at the specified location.

 void mouseDownRight(java.lang.String locator)
          Simulates a user pressing the right mouse button (without releasing it yet) on the specified element.

 void mouseDownRightAt(java.lang.String locator, java.lang.String coordString)
          Simulates a user pressing the right mouse button (without releasing it yet) at the specified location.

 void mouseMove(java.lang.String locator)
          Simulates a user pressing the mouse button (without releasing it yet) on the specified element.

 void mouseMoveAt(java.lang.String locator, java.lang.String coordString)
          Simulates a user pressing the mouse button (without releasing it yet) on the specified element.

 void mouseOut(java.lang.String locator)
          Simulates a user moving the mouse pointer away from the specified element.

 void mouseOver(java.lang.String locator)
          Simulates a user hovering a mouse over the specified element.

 void mouseUp(java.lang.String locator)
          Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the
specified element.

 void mouseUpAt(java.lang.String locator, java.lang.String coordString)
          Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location.

 void mouseUpRight(java.lang.String locator)
          Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.

 void mouseUpRightAt(java.lang.String locator, java.lang.String coordString)
          Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

Richard Lewis
Tarun

Thanks again for the suggestsions. Will try within the hour... Just to clarify i am specifying my target as css=#result_name_1 > img.result-info for example- basically my understanding is i specify the CSS element?????
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

Richard Lewis
ok, so tried them all, no joy.... Any other suggestions.. One of the developers here suggested calling the action via Javascript??
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

softwaretestingforum
Administrator
oh.
Yup try js execution. You can execute js using getEal method of Selenium.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Verify the text within a Popup box

softwaretestingforum
Administrator
to add on, you can execute js as -

selenium.getEval("dom expression")

in dom expression you can invoke methods associated with your field for example the one described here - http://www.w3schools.com/jsref/dom_obj_text.asp
~ seleniumtests.com