com.opera.core.systems.model
Class ScopeActions

java.lang.Object
  extended by com.opera.core.systems.model.ScopeActions

public abstract class ScopeActions
extends Object

ScopeActions handles actions that differ from Core 2.3 and 2.4+, it calls the appropriate action depending on the spec as the specification varies.

Author:
Deniz Turkoglu

Field Summary
protected  IOperaExec execService
           
protected  IEcmaScriptDebugger scriptDebugger
           
protected  ScopeServices services
           
 
Constructor Summary
ScopeActions(ScopeServices services)
           
 
Method Summary
abstract  void click(org.openqa.selenium.WebElement element, int x, int y)
          Creates a native left mouse click (2.4+)
abstract  void click(org.openqa.selenium.WebElement element, String locator)
          Creates a native left mouse click (2.4+) or an ecmascript MouseEvent(2.3)
abstract  void get(String url)
          Loads the specified url via Opera action 'Go' (2.4+) or script injection (2.3) 2.4+ interacts directly with address bar allowing script injection and urls without protocol
abstract  void rightClick(org.openqa.selenium.WebElement element)
          Creates a native right mouse click (2.4+)
abstract  void saveScreenshot(File pngFile)
          Saves the complete page as png file to pngFile (2.4+)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

services

protected final ScopeServices services

scriptDebugger

protected final IEcmaScriptDebugger scriptDebugger

execService

protected final IOperaExec execService
Constructor Detail

ScopeActions

public ScopeActions(ScopeServices services)
Method Detail

click

public abstract void click(org.openqa.selenium.WebElement element,
                           String locator)
Creates a native left mouse click (2.4+) or an ecmascript MouseEvent(2.3)

Parameters:
element - The element to be clicked on top left
locator - The index of the element in elements array

click

public abstract void click(org.openqa.selenium.WebElement element,
                           int x,
                           int y)
Creates a native left mouse click (2.4+)

Parameters:
element - The element to be clicked with x and y coordinates added to top left
Throws:
UnsupportedOperationException - on 2.3

rightClick

public abstract void rightClick(org.openqa.selenium.WebElement element)
Creates a native right mouse click (2.4+)

Parameters:
element - The element to be clicked on top left
Throws:
UnsupportedOperationException - on 2.3

get

public abstract void get(String url)
Loads the specified url via Opera action 'Go' (2.4+) or script injection (2.3) 2.4+ interacts directly with address bar allowing script injection and urls without protocol

Parameters:
url - The page to load

saveScreenshot

public abstract void saveScreenshot(File pngFile)
Saves the complete page as png file to pngFile (2.4+)

Throws:
UnsupportedOperationException - on 2.3


Copyright © 2012. All Rights Reserved.