public
Description: Webdriver binding for ColdFusion.
Homepage:
Clone URL: git://github.com/virtix/cfwebdriver.git
cfwebdriver / WebElement.cfc
100644 76 lines (51 sloc) 1.839 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<cfcomponent hint="Represents an element in a page" output="false">
<cfscript>
  this.webElement = "";
    
  function init(webElement){
   this.webElement = arguments.webElement;
   return this;
  }
    
  //TO DO: Accept int as 2nd param, which indicates mouse and keyboard events - KEYPRESS.KEYDOWN ...
  function sendKeys(keys){
var localKeys = arrayNew(1);
localKeys[1] = keys.toString();
this.webElement.sendKeys(localKeys);
  }
    
  function submit() {
    this.webElement.submit();
  }
  
  function getText() {
    return this.webElement.getText();
  } //}java.lang.String
  
  function clear() {
    this.webElement.clear();
  } //}void
 
 
function click() {
this.webElement.click();
} //}void
 
 
function toggle() {
return this.webElement.toggle();
} //boolean
 
 
function setSelected() {
this.webElement.setSelected();
} //}void
 
 
function isEnabled() {
return this.webElement.isEnabled();
} //}boolean
 
 
function isSelected() {
return this.webElement.isSelected();
} //}boolean
 
//To Do ---------------------------------------
function dragAndDropBy(x,y){} //}(int, int) void
function dragAndDropOn(renderedElement){} //}(org.openqa.selenium.RenderedWebElement) void
function findElement(by){} //}(org.openqa.selenium.By) org.openqa.selenium.WebElement
function findElements(by){} //}(org.openqa.selenium.By) java.util.List
function getAttribute(name){} //}(java.lang.String) java.lang.String
function getChildrenOfType(strElement){} //}(java.lang.String) java.util.List
function getLocation() {} //}ava.awt.Point
function getSize() {} //}java.awt.Dimension
function getValue() {} //}java.lang.String
function getValueOfCssProperty(css){} //}(java.lang.String) java.lang.String
function isDisplayed() {} //}boolean
 
 
 
 
  
 
</cfscript>
</cfcomponent>