|
1 |
| -# Copyright 2008-2013 Software freedom conservancy |
| 1 | +# Copyright 2008-2014 Software freedom conservancy |
2 | 2 | #
|
3 | 3 | # Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 | # you may not use this file except in compliance with the License.
|
|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 |
| - |
16 |
| -"""WebElement implementation.""" |
17 | 15 | import hashlib
|
18 | 16 | import os
|
19 | 17 | import zipfile
|
|
23 | 21 | from io import BytesIO as IOStream
|
24 | 22 | import base64
|
25 | 23 |
|
26 |
| - |
27 | 24 | from .command import Command
|
28 | 25 | from selenium.common.exceptions import WebDriverException
|
29 | 26 | from selenium.common.exceptions import InvalidSelectorException
|
30 | 27 | from selenium.webdriver.common.by import By
|
31 | 28 | from selenium.webdriver.common.keys import Keys
|
32 | 29 |
|
| 30 | + |
33 | 31 | try:
|
34 | 32 | str = basestring
|
35 | 33 | except NameError:
|
36 | 34 | pass
|
37 | 35 |
|
38 | 36 |
|
39 | 37 | class WebElement(object):
|
40 |
| - """Represents an HTML element. |
| 38 | + """Represents a DOM element. |
| 39 | +
|
| 40 | + Generally, all interesting operations to do with interacting with a |
| 41 | + document will be performed through this interface. |
| 42 | +
|
| 43 | + All method calls will do a freshness check to ensure that the element |
| 44 | + reference is still valid. This essentially determines whether or not the |
| 45 | + element is still attached to the DOM. If this test fails, then an |
| 46 | + `StaleElementReferenceException` is thrown, and all future calls to this |
| 47 | + instance will fail.""" |
41 | 48 |
|
42 |
| - Generally, all interesting operations to do with interacting with a page |
43 |
| - will be performed through this interface.""" |
44 | 49 | def __init__(self, parent, id_):
|
45 | 50 | self._parent = parent
|
46 | 51 | self._id = id_
|
|
0 commit comments