File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
py/selenium/webdriver/remote Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
17
18
+ import base64
18
19
import hashlib
19
20
import pkgutil
20
21
import os
21
22
import zipfile
22
- try :
23
- from StringIO import StringIO as IOStream
24
- except ImportError : # 3+
25
- from io import BytesIO as IOStream
26
- import base64
27
23
28
24
from .command import Command
29
25
from selenium .common .exceptions import WebDriverException
30
26
from selenium .webdriver .common .by import By
31
27
from selenium .webdriver .common .utils import keys_to_typing
32
28
33
-
29
+ # Python 3 imports
34
30
try :
35
31
str = basestring
36
32
except NameError :
37
33
pass
38
34
35
+ try :
36
+ from StringIO import StringIO as IOStream
37
+ except ImportError : # 3+
38
+ from io import BytesIO as IOStream
39
+
39
40
40
41
class WebElement (object ):
41
42
"""Represents a DOM element.
@@ -129,7 +130,7 @@ def get_attribute(self, name):
129
130
"""
130
131
131
132
attributeValue = ''
132
- if self ._w3c :
133
+ if self ._w3c :
133
134
raw = pkgutil .get_data (__package__ , 'getAttribute.js' )
134
135
attributeValue = self .parent .execute_script (
135
136
"return (%s).apply(null, arguments);" % raw ,
You can’t perform that action at this time.
0 commit comments