getWindowHandles: Get all window handles.

Description Usage Arguments Value See Also Examples

Description

getWindowHandles Retrieve the list of all window handles available to the session.

Usage

1

Arguments

remDr

An object of class "rDriver". A remote driver object see remoteDr.

...

Additonal function arguments - Currently passes the retry argument.

Value

Returns a list of windows handles. Each element of the list is a string. The order window handles are returned is arbitrary.

See Also

Other commandContexts functions: closeWindow, fullscreenWindow, getWindowHandle, getWindowPosition, getWindowSize, maximizeWindow, setWindowPosition, setWindowSize, switchToFrame, switchToParentFrame, switchToWindow

Examples

 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
## Not run: 
  remDr <- remoteDr()
  remDr %>% getWindowHandle() # The current window handle
  remDr %>% getWindowHandles() # All windows in the session

  # Get the window position
  remDr %>% getWindowPosition

  # Some browsers are still using the old JSON wire end points
  remDr %>% getWindowPositionOld

  # Get the size of the window
  remDr %>% getWindowSize

  # Some browsers are still using the old JSON wire end points
  # remDr %>% getWindowSizeOld

  # Set the window size
  remDr %>% setWindowSize(500, 500)

  # Some browsers are still using the old JSON wire end points
  remDr %>% setWindowSizeOld(500, 500)

  # Set the position of the window
  remDr %>% setWindowPositionOld(400, 100)

  # Some browsers are still using the old JSON wire end points
  # remDr %>% setWindowPositionOld(400, 100)

  # Maximise the window
  remDr %>% maximizeWindow
  # Some browsers are still using the old JSON wire end points
  # remDr %>% maximizeWindowold()

  remDr %>% go("http://www.google.com/ncr")
  # search for the "R project"

  remDr %>% findElement("name", "q") %>% elementSendKeys("R project", key = "enter")

  webElem <- remDr %>% findElement("css", "h3.r a")

  remDr %>% deleteSession

## End(Not run)

seleniumPipes documentation built on May 2, 2019, 5:57 a.m.