2

Please suggest what logic should be used here through selenium RC.

Action
Check Close/Remove button.

Expected

In the upper-right corner of the app is a Close/Remove button. This button only appears if there is at least one other app in the App Gallery module.

asked Jun 27, 2011 at 11:06

1 Answer 1

4

"element position in upper right corner" -

Assert.assertTrue(getElementPositionLeft(buttonLocator).equal("some pixels"))
Assert.assertTrue(getElementPositionTop(buttonLocator).equal("some pixels"))

Notice that doing so also checks that element is present in page.

"This button only appears if there is at least one other app in the App Gallery module"

You could assert presence of app in app gallary module, when

isElementPrent("buttonLocator")

returns true.

answered Jun 27, 2011 at 11:39
4
  • Thanks a lot lot @Tarun, This is my understanding on this ... getElementPositionLeft(buttonLocator).equal("some pixels")) ,As you mentioned in one of my x,y coordinate, that first we check the element x and y position & store it in variable. After that verify it on run time. Is it OK? Commented Jun 27, 2011 at 12:02
  • One more thing for postion of an element check. We have this x,y coordinate in Selenium? Commented Jun 27, 2011 at 12:03
  • Please Comment.. Commented Jun 27, 2011 at 12:38
  • I suppose x refer to left and y refer to top, hence getElementPositionLeft() would give you String object which you could compare with expected value. Same with getElementPositionTop. Commented Jun 27, 2011 at 13:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.