Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api_endpoint = 'https://api.uilicious.com/v3.0/project/testrun/start' sends 404 error #1

Open
priyansh4320 opened this issue Dec 30, 2023 · 1 comment

Comments

@priyansh4320
Copy link

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'
}

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
@priyansh4320
Copy link
Author

@uilicious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant