Question

I am working on selinium IDE. I wan to use mouse scroll command to a pop up menu. it works perfectly fine with window scroll bar. But can't use for pop up menu scroll bar.

"selenium.browserbot.getCurrentWindow()" will scroll the main window only. Not the one that currently active.

Command   Target                      Value
store         40                         i
store          0                         looptimes
while         storedVars.looptimes <= 20    
storeEval     selenium.browserbot.getCurrentWindow().scrollTo(0,${i})   
store         javascript{storedVars.looptimes++;}

storeEval     ${i}+40                         i
endWhile    

I am attaching screen shot of command and my screen. CODE

The above is the code. below is my pop up menu MENU

Please tell me how to do this.

Was it helpful?

Solution

You will need to tell selenium to change framesI think, to do this you will have to use the selectFrameCommand:

selectFrame ( locator ) Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top". You can also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2". You may also use a DOM expression to identify the frame you want directly, like this: dom=frames["main"].frames["subframe"]

Arguments:

locator - an element locator identifying a frame or iframe

Once you have changed to the correct frame the mouse scroll should work

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top