terminating ControlKeyDown() Event

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

terminating ControlKeyDown() Event

Muaaz
hi ,

I found a weird problems is that , i use Control Key down and Up to select a particular data record in a grid.but unfortunately due data is not available in the grid , relevant controlKeyDown event session overrrides with my remaining selenium commands.

Is there a way to terminate selenium command after it taken place from selenium server.Following is the error message that appears.



com.thoughtworks.selenium.SeleniumException: ERROR: type not supported immediately after call to controlKeyDown() or altKeyDown() or metaKeyDown()

help me ...  
Reply | Threaded
Open this post in threaded view
|

Re: terminating ControlKeyDown() Event

softwaretestingforum
Administrator
I suppose you are referring to control key up not working when there is empty data grid, are you?
If so then I assume that control key up works when you when data grid is not empty.
In this case you can use control key down and up in only those grids which have data. Does this help?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: terminating ControlKeyDown() Event

Muaaz
Yes tarun , u understand what i said ..but i didnt get what u are trying to say,

As following code , assume data is not in the grid , then selenium.ControlkeyDown() event continusely overrides with my remaining selenium command , as i mentioned earlier ,

Is there a selenium or other method can be take place to remove the command from selenium server ,  


        selenium.controlKeyDown();
                selenium.mouseDown("//div[contains(text(),"+ItemId+")]");
                //selenium.clickAt("//html/body/table/tbody/tr[2]/td/table/tbody/tr/td[2]/div/table/tbody/tr[3]/td/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr/td/div/div", "");
                selenium.mouseUp("//div[contains(text(),"+ItemId+")]");
                selenium.controlKeyUp();




Reply | Threaded
Open this post in threaded view
|

Re: terminating ControlKeyDown() Event

softwaretestingforum
Administrator
So I was referring to this -

if("data exist in grod")  {
  selenium.controlKeyDown();
// some more logic here
}

So if no data exist in grid then you don't use keydown and not affected by error.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: terminating ControlKeyDown() Event

Muaaz
Tarun ,

thanks for the idea , i tested on one test cases ..seems like its working ,

Thank you ,