You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result = access_uilicious_api(api_endpoint, data=metadata, method='POST')
if result is not None:
return result['result']['testRunIDs'][0]
return result
def retrieve_api_data(url):
# if you dont have a token, generate it first
access_token = '93920b47afedc53da87c37d15e5c562bae9eecfe615fead02fe60eecc204ea58'
subdomain = 'cohere'
# Set the headers
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}',
'Business': subdomain
}
# Make the GET request
try:
response = requests.get(url, headers=headers)
if response.status_code == 200:
result = response.json()
return result
else:
print(f'Error: {response.status_code} - {response.text}')
except Exception as e:
print(f'An error occurred: {str(e)}')
return None
The text was updated successfully, but these errors were encountered:
def uilicious_run_test(script):
api_endpoint = 'https://api.uilicious.com/v3.0/project/testrun/start'
metadata = {
'projectID': '4Wvt4s3BYsj6wf3Xp3phwQ',
'browser': 'chrome',
'width': '800',
'height': '600',
'script': script,
'name': 'thisisatest'
}
def retrieve_api_data(url):
The text was updated successfully, but these errors were encountered: