-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
34 lines (29 loc) · 821 Bytes
/
config.py
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
import json
import urllib.parse
try:
from robot.libraries.BuiltIn import BuiltIn
from robot.libraries.BuiltIn import _Misc
import robot.api.logger as logger
from robot.api.deco import keyword
ROBOT = False
except Exception:
ROBOT = False
@keyword("Capability")
def caps(user: str, access_key: str) -> str:
a = {
'browserName': 'pw-webkit',
'browserVersion': 'latest',
#lambdatest specific options
'LT:Options': {
'platform': 'macOS Monterey',
'build': 'browser-library tests',
'name': 'browser-library',
#provide Your username and access key
'user': user,
'accessKey': access_key,
}
}
# Convert JSON to String
y = json.dumps(a)
print("Encoded" + urllib.parse.quote(y))
return urllib.parse.quote(y)