Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Check Close/Remove button.


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.

share|improve this question
up vote 4 down vote accepted

"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


returns true.

share|improve this answer
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? – smriti Jun 27 '11 at 12:02
One more thing for postion of an element check. We have this x,y coordinate in Selenium? – smriti Jun 27 '11 at 12:03
Please Comment.. – smriti Jun 27 '11 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. – Tarun Jun 27 '11 at 13:44
Thanks a lot again. – smriti Jun 28 '11 at 6:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.