"clickAt" and "clickAtAndWait" commands with example in selenium IDE

 "clickAt" selenium IDE command

"clickAt" command is useful when you need to click on specific x,y position of any element of software web application. Sometime this types of conditions occurs at that time you can use clickAt command. You need to fill x,y position value in value field of command.

In bellow example of selenium IDE software automation tool, It will click at 10,10 position on element "css=#gb_2 > span.gbts".

New Test
Command Target Value
open https://www.google.co.in/
clickAt css=#gb_2 > span.gbts 10,10

You can use "clickAt" command when "click" command not working. I have seen many times where "click"
command not worked for me but worked "clickAt" command in software application's test case.

 "clickAtAndWait" selenium IDE command

"clickAtAndWait" command is used when you want selenium wait to execute next command till page of software web application loaded successfully. It will click at specified coordinates of element.

In bellow given example, After clicking at element "css=#gb_2 > span.gbts", selenium IDE software testing tool will wait for loading page successfully. Once page loaded successfully, it will click on "css=#gb_23 > span.gbts".


New Test
Command Target Value
open https://www.google.co.in/
clickAtAndWait css=#gb_2 > span.gbts 50,50
click css=#gb_23 > span.gbts



9 comments:

  1. "clickAt" how we know coordinates?

    ReplyDelete
    Replies
    1. "clickAt" - All the same, what do you want the coordinates? if we put any two tsifrynichego not change!

      Delete
  2. Replies
    1. Finding coordinates on element is not possible using selenium IDE. You need to put it just manually. Yes you can find element position on page through storeElementPositionLeft and storeElementPositionTop commands. example is here http://software-testing-tutorials-automation.blogspot.in/2013/03/using-storeelementpositionleft-and.html#more

      Delete
  3. Hi,
    You need to provide coordinates with respect to Object's location (just incase someone does not know). So objects top, left corner is considered as (0,0) You can count pixel's in X and Y direction using this tool called "Free Ruler".

    -Vinay

    ReplyDelete
  4. Could somebody explain me how to fine these css=#gb_2 > span.gbts while recording . When i record it shows link=Images and not css=#gb_2 > span.gbts. Is it that i need to configure my selenium .

    ReplyDelete
    Replies
    1. You can set CSS locator on 1st position In locator builder tab of selenium IDE options window.

      Delete