├── .github └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── Automated_UI_Testing.png ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CodePipeline_Flow.png ├── LICENSE.txt ├── README.md ├── automated-ui-testing-params.json ├── automated-ui-testing.yaml ├── buildspec-phantomjs.yml ├── buildspec.yml ├── lambda_function ├── certifi │ ├── __init__.py │ ├── __init__.pyc │ ├── __main__.py │ ├── __main__.pyc │ ├── cacert.pem │ ├── core.py │ ├── core.pyc │ ├── old_root.pem │ └── weak.pem ├── chardet │ ├── __init__.py │ ├── __init__.pyc │ ├── big5freq.py │ ├── big5freq.pyc │ ├── big5prober.py │ ├── big5prober.pyc │ ├── chardistribution.py │ ├── chardistribution.pyc │ ├── charsetgroupprober.py │ ├── charsetgroupprober.pyc │ ├── charsetprober.py │ ├── charsetprober.pyc │ ├── cli │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── chardetect.py │ │ └── chardetect.pyc │ ├── codingstatemachine.py │ ├── codingstatemachine.pyc │ ├── compat.py │ ├── compat.pyc │ ├── cp949prober.py │ ├── cp949prober.pyc │ ├── enums.py │ ├── enums.pyc │ ├── escprober.py │ ├── escprober.pyc │ ├── escsm.py │ ├── escsm.pyc │ ├── eucjpprober.py │ ├── eucjpprober.pyc │ ├── euckrfreq.py │ ├── euckrfreq.pyc │ ├── euckrprober.py │ ├── euckrprober.pyc │ ├── euctwfreq.py │ ├── euctwfreq.pyc │ ├── euctwprober.py │ ├── euctwprober.pyc │ ├── gb2312freq.py │ ├── gb2312freq.pyc │ ├── gb2312prober.py │ ├── gb2312prober.pyc │ ├── hebrewprober.py │ ├── hebrewprober.pyc │ ├── jisfreq.py │ ├── jisfreq.pyc │ ├── jpcntx.py │ ├── jpcntx.pyc │ ├── langbulgarianmodel.py │ ├── langbulgarianmodel.pyc │ ├── langcyrillicmodel.py │ ├── langcyrillicmodel.pyc │ ├── langgreekmodel.py │ ├── langgreekmodel.pyc │ ├── langhebrewmodel.py │ ├── langhebrewmodel.pyc │ ├── langhungarianmodel.py │ ├── langhungarianmodel.pyc │ ├── langthaimodel.py │ ├── langthaimodel.pyc │ ├── langturkishmodel.py │ ├── langturkishmodel.pyc │ ├── latin1prober.py │ ├── latin1prober.pyc │ ├── mbcharsetprober.py │ ├── mbcharsetprober.pyc │ ├── mbcsgroupprober.py │ ├── mbcsgroupprober.pyc │ ├── mbcssm.py │ ├── mbcssm.pyc │ ├── sbcharsetprober.py │ ├── sbcharsetprober.pyc │ ├── sbcsgroupprober.py │ ├── sbcsgroupprober.pyc │ ├── sjisprober.py │ ├── sjisprober.pyc │ ├── universaldetector.py │ ├── universaldetector.pyc │ ├── utf8prober.py │ ├── utf8prober.pyc │ ├── version.py │ └── version.pyc ├── idna │ ├── __init__.py │ ├── __init__.pyc │ ├── codec.py │ ├── codec.pyc │ ├── compat.py │ ├── compat.pyc │ ├── core.py │ ├── core.pyc │ ├── idnadata.py │ ├── idnadata.pyc │ ├── intranges.py │ ├── intranges.pyc │ ├── package_data.py │ ├── package_data.pyc │ ├── uts46data.py │ └── uts46data.pyc ├── phantomjs ├── requests │ ├── __init__.py │ ├── __init__.pyc │ ├── __version__.py │ ├── __version__.pyc │ ├── _internal_utils.py │ ├── _internal_utils.pyc │ ├── adapters.py │ ├── adapters.pyc │ ├── api.py │ ├── api.pyc │ ├── auth.py │ ├── auth.pyc │ ├── certs.py │ ├── certs.pyc │ ├── compat.py │ ├── compat.pyc │ ├── cookies.py │ ├── cookies.pyc │ ├── exceptions.py │ ├── exceptions.pyc │ ├── help.py │ ├── help.pyc │ ├── hooks.py │ ├── hooks.pyc │ ├── models.py │ ├── models.pyc │ ├── packages.py │ ├── packages.pyc │ ├── sessions.py │ ├── sessions.pyc │ ├── status_codes.py │ ├── status_codes.pyc │ ├── structures.py │ ├── structures.pyc │ ├── utils.py │ └── utils.pyc ├── selenium │ ├── __init__.py │ ├── __init__.pyc │ ├── common │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── exceptions.py │ │ └── exceptions.pyc │ └── webdriver │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── android │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── blackberry │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── chrome │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── options.py │ │ ├── options.pyc │ │ ├── remote_connection.py │ │ ├── remote_connection.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── common │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── action_chains.py │ │ ├── action_chains.pyc │ │ ├── actions │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── action_builder.py │ │ │ ├── action_builder.pyc │ │ │ ├── input_device.py │ │ │ ├── input_device.pyc │ │ │ ├── interaction.py │ │ │ ├── interaction.pyc │ │ │ ├── key_actions.py │ │ │ ├── key_actions.pyc │ │ │ ├── key_input.py │ │ │ ├── key_input.pyc │ │ │ ├── mouse_button.py │ │ │ ├── mouse_button.pyc │ │ │ ├── pointer_actions.py │ │ │ ├── pointer_actions.pyc │ │ │ ├── pointer_input.py │ │ │ └── pointer_input.pyc │ │ ├── alert.py │ │ ├── alert.pyc │ │ ├── by.py │ │ ├── by.pyc │ │ ├── desired_capabilities.py │ │ ├── desired_capabilities.pyc │ │ ├── html5 │ │ │ ├── __init__.py │ │ │ ├── __init__.pyc │ │ │ ├── application_cache.py │ │ │ └── application_cache.pyc │ │ ├── keys.py │ │ ├── keys.pyc │ │ ├── proxy.py │ │ ├── proxy.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── touch_actions.py │ │ ├── touch_actions.pyc │ │ ├── utils.py │ │ └── utils.pyc │ │ ├── edge │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── options.py │ │ ├── options.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── firefox │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── amd64 │ │ │ └── x_ignore_nofocus.so │ │ ├── extension_connection.py │ │ ├── extension_connection.pyc │ │ ├── firefox_binary.py │ │ ├── firefox_binary.pyc │ │ ├── firefox_profile.py │ │ ├── firefox_profile.pyc │ │ ├── options.py │ │ ├── options.pyc │ │ ├── remote_connection.py │ │ ├── remote_connection.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ ├── webdriver.pyc │ │ ├── webdriver.xpi │ │ ├── webdriver_prefs.json │ │ ├── webelement.py │ │ ├── webelement.pyc │ │ └── x86 │ │ │ └── x_ignore_nofocus.so │ │ ├── ie │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── opera │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── options.py │ │ ├── options.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── phantomjs │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ ├── remote │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── command.py │ │ ├── command.pyc │ │ ├── errorhandler.py │ │ ├── errorhandler.pyc │ │ ├── file_detector.py │ │ ├── file_detector.pyc │ │ ├── getAttribute.js │ │ ├── isDisplayed.js │ │ ├── mobile.py │ │ ├── mobile.pyc │ │ ├── remote_connection.py │ │ ├── remote_connection.pyc │ │ ├── switch_to.py │ │ ├── switch_to.pyc │ │ ├── utils.py │ │ ├── utils.pyc │ │ ├── webdriver.py │ │ ├── webdriver.pyc │ │ ├── webelement.py │ │ └── webelement.pyc │ │ ├── safari │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── service.py │ │ ├── service.pyc │ │ ├── webdriver.py │ │ └── webdriver.pyc │ │ └── support │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── abstract_event_listener.py │ │ ├── abstract_event_listener.pyc │ │ ├── color.py │ │ ├── color.pyc │ │ ├── event_firing_webdriver.py │ │ ├── event_firing_webdriver.pyc │ │ ├── events.py │ │ ├── events.pyc │ │ ├── expected_conditions.py │ │ ├── expected_conditions.pyc │ │ ├── select.py │ │ ├── select.pyc │ │ ├── ui.py │ │ ├── ui.pyc │ │ ├── wait.py │ │ └── wait.pyc ├── testsuite.py └── urllib3 │ ├── __init__.py │ ├── __init__.pyc │ ├── _collections.py │ ├── _collections.pyc │ ├── connection.py │ ├── connection.pyc │ ├── connectionpool.py │ ├── connectionpool.pyc │ ├── contrib │ ├── __init__.py │ ├── __init__.pyc │ ├── _securetransport │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── bindings.py │ │ ├── bindings.pyc │ │ ├── low_level.py │ │ └── low_level.pyc │ ├── appengine.py │ ├── appengine.pyc │ ├── ntlmpool.py │ ├── ntlmpool.pyc │ ├── pyopenssl.py │ ├── pyopenssl.pyc │ ├── securetransport.py │ ├── securetransport.pyc │ ├── socks.py │ └── socks.pyc │ ├── exceptions.py │ ├── exceptions.pyc │ ├── fields.py │ ├── fields.pyc │ ├── filepost.py │ ├── filepost.pyc │ ├── packages │ ├── __init__.py │ ├── __init__.pyc │ ├── backports │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── makefile.py │ │ └── makefile.pyc │ ├── ordered_dict.py │ ├── ordered_dict.pyc │ ├── six.py │ ├── six.pyc │ └── ssl_match_hostname │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── _implementation.py │ │ └── _implementation.pyc │ ├── poolmanager.py │ ├── poolmanager.pyc │ ├── request.py │ ├── request.pyc │ ├── response.py │ ├── response.pyc │ └── util │ ├── __init__.py │ ├── __init__.pyc │ ├── connection.py │ ├── connection.pyc │ ├── request.py │ ├── request.pyc │ ├── response.py │ ├── response.pyc │ ├── retry.py │ ├── retry.pyc │ ├── selectors.py │ ├── selectors.pyc │ ├── ssl_.py │ ├── ssl_.pyc │ ├── timeout.py │ ├── timeout.pyc │ ├── url.py │ ├── url.pyc │ ├── wait.py │ └── wait.pyc ├── modulelist.json ├── prepare_test.py ├── status ├── generatetable.js └── index.html ├── tests └── testsuite.py ├── webdrivers ├── chromedriver └── geckodriver ├── website ├── button_click.html ├── check_box.html ├── dropdown.html ├── images.html ├── index.html ├── key_press.html ├── test1.png └── test2.png └── xvfb.init /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *Issue #, if available:* 2 | 3 | *Description of changes:* 4 | 5 | 6 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /Automated_UI_Testing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/Automated_UI_Testing.png -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /CodePipeline_Flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/CodePipeline_Flow.png -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Serverless-Automated-UI-Testing 2 | 3 | Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | SPDX-License-Identifier: MIT-0 5 | 6 | *** 7 | 8 | UI Testing is one of the important part of SDLC. This repo contains sample website which can be hosted as S3 website. AWS CodeBuild has been used to perform the Automated UI testing using Selenium Webdriver on Firefox and Chrome. AWS CodeBuild also have been used to trigger asyncronous headless UI testing on PhantomJS using AWS Lambda. AWS CodePipeline have been used to orchestrate the Continuous Delivery pipeline with multiple stages such as Source, UI Testing, Approval & Production Deployment. This repo contains the CloudFormtaion template which will create the CodePipeline and the corresponding resources (AWS CodeCommit repository needs to be created manually and files should be commited). 9 | 10 | Details about using this repo is detailed in the blog post. 11 | 12 | *** 13 | 14 | ![CodePipeline Design](Automated_UI_Testing.png) 15 | 16 | Let's start by creating the repository and enabling Continuous Delivery pipeline for automated UI testing. 17 | 18 | 19 | ## Step 1: 20 | 21 | ### Creating CodeCommit repository 22 | Create a CodeCommit repository as mentioned below. 23 | 24 | ```bash 25 | aws codecommit create-repository --repository-name automated-ui-testing --repository-description "Repository for Automated UI Testing and Continuous Delivery using CodePipeline." 26 | ``` 27 | 28 | Once the CodeCommit repository has been created, clone this GitHub repository and upload the content to `automated-ui-testing`. 29 | 30 | 31 | ## Step 2: 32 | 33 | ### Update CloudFormation parameters configuration file 34 | There is a JSON (*CloudFormation Configuration*) file in the repo. 35 | 36 | **[automated-ui-testing-params.json](automated-ui-testing-params.json):** - CloudFormation parameter configuration file for Continuous Delivery Pipeline. 37 | 38 | Update the configuration file with appropriate values for *SourceRepo, ApprovalTopic, ProductionBucket* based on the requirement. 39 | 40 | 41 | ## Step 3: 42 | 43 | ### Creating CodePipeline using CloudFormation 44 | 45 | Once the configuration file has been updated, execute the following command to create the CloudFormation stack which will create the required CodePipeline. 46 | 47 | ```bash 48 | aws cloudformation create-stack --stack-name automated_ui_testing --template-body file://automated-ui-testing.yaml --parameters file://automated-ui-testing-params.json --capabilities CAPABILITY_NAMED_IAM 49 | ``` 50 | 51 | Once the CloudFormation successfully creates the stack, it would have created a CodePipeline with similar stages as shown below. 52 | 53 | ![CodePipeline Stages](CodePipeline_Flow.png) 54 | 55 | _Note: While deleting, the CloudFormation will retain the S3 buckets it has created. If not needed, the buckets created by CloudFormation will contian the stack name as part of bucket name, identify those buckets and delete them._ 56 | -------------------------------------------------------------------------------- /automated-ui-testing-params.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ParameterKey": "SourceRepo", 4 | "ParameterValue": "automated-ui-testing" 5 | }, 6 | { 7 | "ParameterKey": "ApprovalTopic", 8 | "ParameterValue": "prod-approval-topic" 9 | }, 10 | { 11 | "ParameterKey": "ProductionBucket", 12 | "ParameterValue": "production-s3-website-bucket" 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /buildspec-phantomjs.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | variables: 5 | BROWSER: "phantomjs" 6 | WebURL: "https://sampletestweb.s3-eu-west-1.amazonaws.com/website/index.html" 7 | ArtifactBucket: "codebuild-demo-artifact-repository" 8 | MODULES: "mod1" 9 | ModuleTable: "test-modules" 10 | StatusTable: "blog-test-status" 11 | LambdaRole: "arn:aws:iam::account-id:role/role-name" 12 | 13 | phases: 14 | install: 15 | commands: 16 | - apt-get update 17 | - apt-get -y upgrade 18 | - apt-get install python python-pip build-essential -y 19 | - apt-get install zip unzip -y 20 | - pip install --upgrade pip 21 | - pip install selenium 22 | - pip install awscli 23 | - pip install requests 24 | - pip install boto3 25 | pre_build: 26 | commands: 27 | - python prepare_test.py 28 | build: 29 | commands: 30 | - cd lambda_function 31 | - echo "Packaging Lambda Function..." 32 | - zip -r /tmp/lambda_function.zip ./* 33 | - func_name=`echo $CODEBUILD_BUILD_ID | awk -F ':' '{print $1}'`-phantomjs 34 | - echo "Creating Lambda Function..." 35 | - chmod 777 phantomjs 36 | - | 37 | func_list=`aws lambda list-functions | grep FunctionName | awk -F':' '{print $2}' | tr -d ', "'` 38 | if echo "$func_list" | grep -qw $func_name 39 | then 40 | echo "Lambda function already exists." 41 | else 42 | aws lambda create-function --function-name $func_name --runtime "python2.7" --role $LambdaRole --handler "testsuite.lambda_handler" --zip-file fileb:///tmp/lambda_function.zip --timeout 150 --memory-size 1024 --environment Variables="{WebURL=$WebURL, StatusTable=$StatusTable}" --tags Name=$func_name 43 | fi 44 | - export PhantomJSFunction=$func_name 45 | - cd ../tests/ 46 | - python testsuite.py 47 | -------------------------------------------------------------------------------- /buildspec.yml: -------------------------------------------------------------------------------- 1 | version: 0.2 2 | 3 | env: 4 | variables: 5 | BROWSER: "chrome" 6 | WebURL: "https://sampletestweb.s3-eu-west-1.amazonaws.com/website/index.html" 7 | ArtifactBucket: "codebuild-demo-artifact-repository" 8 | MODULES: "mod1" 9 | ModuleTable: "test-modules" 10 | StatusTable: "blog-test-status" 11 | 12 | phases: 13 | install: 14 | commands: 15 | - apt-get update 16 | - apt-get -y upgrade 17 | - apt-get install xvfb python python-pip build-essential -y 18 | - pip install --upgrade pip 19 | - pip install selenium 20 | - pip install awscli 21 | - pip install requests 22 | - pip install boto3 23 | - cp xvfb.init /etc/init.d/xvfb 24 | - chmod +x /etc/init.d/xvfb 25 | - update-rc.d xvfb defaults 26 | - service xvfb start 27 | - export PATH="$PATH:`pwd`/webdrivers" 28 | pre_build: 29 | commands: 30 | - python prepare_test.py 31 | build: 32 | commands: 33 | - export DISPLAY=:5 34 | - cd tests 35 | - echo "Executing simple test..." 36 | - python testsuite.py 37 | -------------------------------------------------------------------------------- /lambda_function/certifi/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import where, old_where 2 | 3 | __version__ = "2017.07.27.1" 4 | -------------------------------------------------------------------------------- /lambda_function/certifi/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/certifi/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/certifi/__main__.py: -------------------------------------------------------------------------------- 1 | from certifi import where 2 | print(where()) 3 | -------------------------------------------------------------------------------- /lambda_function/certifi/__main__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/certifi/__main__.pyc -------------------------------------------------------------------------------- /lambda_function/certifi/core.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certifi.py 6 | ~~~~~~~~~~ 7 | 8 | This module returns the installation location of cacert.pem. 9 | """ 10 | import os 11 | import warnings 12 | 13 | 14 | class DeprecatedBundleWarning(DeprecationWarning): 15 | """ 16 | The weak security bundle is being deprecated. Please bother your service 17 | provider to get them to stop using cross-signed roots. 18 | """ 19 | 20 | 21 | def where(): 22 | f = os.path.dirname(__file__) 23 | 24 | return os.path.join(f, 'cacert.pem') 25 | 26 | 27 | def old_where(): 28 | warnings.warn( 29 | "The weak security bundle is being deprecated.", 30 | DeprecatedBundleWarning 31 | ) 32 | f = os.path.dirname(__file__) 33 | return os.path.join(f, 'weak.pem') 34 | 35 | if __name__ == '__main__': 36 | print(where()) 37 | -------------------------------------------------------------------------------- /lambda_function/certifi/core.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/certifi/core.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | 19 | from .compat import PY2, PY3 20 | from .universaldetector import UniversalDetector 21 | from .version import __version__, VERSION 22 | 23 | 24 | def detect(byte_str): 25 | """ 26 | Detect the encoding of the given byte string. 27 | 28 | :param byte_str: The byte sequence to examine. 29 | :type byte_str: ``bytes`` or ``bytearray`` 30 | """ 31 | if not isinstance(byte_str, bytearray): 32 | if not isinstance(byte_str, bytes): 33 | raise TypeError('Expected object of type bytes or bytearray, got: ' 34 | '{0}'.format(type(byte_str))) 35 | else: 36 | byte_str = bytearray(byte_str) 37 | detector = UniversalDetector() 38 | detector.feed(byte_str) 39 | return detector.close() 40 | -------------------------------------------------------------------------------- /lambda_function/chardet/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/big5freq.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/big5freq.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import Big5DistributionAnalysis 31 | from .mbcssm import BIG5_SM_MODEL 32 | 33 | 34 | class Big5Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(Big5Prober, self).__init__() 37 | self.coding_sm = CodingStateMachine(BIG5_SM_MODEL) 38 | self.distribution_analyzer = Big5DistributionAnalysis() 39 | self.reset() 40 | 41 | @property 42 | def charset_name(self): 43 | return "Big5" 44 | 45 | @property 46 | def language(self): 47 | return "Chinese" 48 | -------------------------------------------------------------------------------- /lambda_function/chardet/big5prober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/big5prober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/chardistribution.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/chardistribution.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/charsetgroupprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/charsetgroupprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/charsetprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/charsetprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/cli/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lambda_function/chardet/cli/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/cli/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/cli/chardetect.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Script which takes one or more file paths and reports on their detected 4 | encodings 5 | 6 | Example:: 7 | 8 | % chardetect somefile someotherfile 9 | somefile: windows-1252 with confidence 0.5 10 | someotherfile: ascii with confidence 1.0 11 | 12 | If no paths are provided, it takes its input from stdin. 13 | 14 | """ 15 | 16 | from __future__ import absolute_import, print_function, unicode_literals 17 | 18 | import argparse 19 | import sys 20 | 21 | from chardet import __version__ 22 | from chardet.compat import PY2 23 | from chardet.universaldetector import UniversalDetector 24 | 25 | 26 | def description_of(lines, name='stdin'): 27 | """ 28 | Return a string describing the probable encoding of a file or 29 | list of strings. 30 | 31 | :param lines: The lines to get the encoding of. 32 | :type lines: Iterable of bytes 33 | :param name: Name of file or collection of lines 34 | :type name: str 35 | """ 36 | u = UniversalDetector() 37 | for line in lines: 38 | line = bytearray(line) 39 | u.feed(line) 40 | # shortcut out of the loop to save reading further - particularly useful if we read a BOM. 41 | if u.done: 42 | break 43 | u.close() 44 | result = u.result 45 | if PY2: 46 | name = name.decode(sys.getfilesystemencoding(), 'ignore') 47 | if result['encoding']: 48 | return '{0}: {1} with confidence {2}'.format(name, result['encoding'], 49 | result['confidence']) 50 | else: 51 | return '{0}: no result'.format(name) 52 | 53 | 54 | def main(argv=None): 55 | """ 56 | Handles command line arguments and gets things started. 57 | 58 | :param argv: List of arguments, as if specified on the command-line. 59 | If None, ``sys.argv[1:]`` is used instead. 60 | :type argv: list of str 61 | """ 62 | # Get command line arguments 63 | parser = argparse.ArgumentParser( 64 | description="Takes one or more file paths and reports their detected \ 65 | encodings") 66 | parser.add_argument('input', 67 | help='File whose encoding we would like to determine. \ 68 | (default: stdin)', 69 | type=argparse.FileType('rb'), nargs='*', 70 | default=[sys.stdin if PY2 else sys.stdin.buffer]) 71 | parser.add_argument('--version', action='version', 72 | version='%(prog)s {0}'.format(__version__)) 73 | args = parser.parse_args(argv) 74 | 75 | for f in args.input: 76 | if f.isatty(): 77 | print("You are running chardetect interactively. Press " + 78 | "CTRL-D twice at the start of a blank line to signal the " + 79 | "end of your input. If you want help, run chardetect " + 80 | "--help\n", file=sys.stderr) 81 | print(description_of(f, f.name)) 82 | 83 | 84 | if __name__ == '__main__': 85 | main() 86 | -------------------------------------------------------------------------------- /lambda_function/chardet/cli/chardetect.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/cli/chardetect.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/codingstatemachine.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/codingstatemachine.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Dan Blanchard 4 | # Ian Cordasco 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | # 02110-1301 USA 20 | ######################### END LICENSE BLOCK ######################### 21 | 22 | import sys 23 | 24 | 25 | if sys.version_info < (3, 0): 26 | PY2 = True 27 | PY3 = False 28 | base_str = (str, unicode) 29 | text_type = unicode 30 | else: 31 | PY2 = False 32 | PY3 = True 33 | base_str = (bytes, str) 34 | text_type = str 35 | -------------------------------------------------------------------------------- /lambda_function/chardet/compat.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/compat.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/cp949prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .chardistribution import EUCKRDistributionAnalysis 29 | from .codingstatemachine import CodingStateMachine 30 | from .mbcharsetprober import MultiByteCharSetProber 31 | from .mbcssm import CP949_SM_MODEL 32 | 33 | 34 | class CP949Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(CP949Prober, self).__init__() 37 | self.coding_sm = CodingStateMachine(CP949_SM_MODEL) 38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be 39 | # not different. 40 | self.distribution_analyzer = EUCKRDistributionAnalysis() 41 | self.reset() 42 | 43 | @property 44 | def charset_name(self): 45 | return "CP949" 46 | 47 | @property 48 | def language(self): 49 | return "Korean" 50 | -------------------------------------------------------------------------------- /lambda_function/chardet/cp949prober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/cp949prober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/enums.py: -------------------------------------------------------------------------------- 1 | """ 2 | All of the Enums that are used throughout the chardet package. 3 | 4 | :author: Dan Blanchard (dan.blanchard@gmail.com) 5 | """ 6 | 7 | 8 | class InputState(object): 9 | """ 10 | This enum represents the different states a universal detector can be in. 11 | """ 12 | PURE_ASCII = 0 13 | ESC_ASCII = 1 14 | HIGH_BYTE = 2 15 | 16 | 17 | class LanguageFilter(object): 18 | """ 19 | This enum represents the different language filters we can apply to a 20 | ``UniversalDetector``. 21 | """ 22 | CHINESE_SIMPLIFIED = 0x01 23 | CHINESE_TRADITIONAL = 0x02 24 | JAPANESE = 0x04 25 | KOREAN = 0x08 26 | NON_CJK = 0x10 27 | ALL = 0x1F 28 | CHINESE = CHINESE_SIMPLIFIED | CHINESE_TRADITIONAL 29 | CJK = CHINESE | JAPANESE | KOREAN 30 | 31 | 32 | class ProbingState(object): 33 | """ 34 | This enum represents the different states a prober can be in. 35 | """ 36 | DETECTING = 0 37 | FOUND_IT = 1 38 | NOT_ME = 2 39 | 40 | 41 | class MachineState(object): 42 | """ 43 | This enum represents the different states a state machine can be in. 44 | """ 45 | START = 0 46 | ERROR = 1 47 | ITS_ME = 2 48 | 49 | 50 | class SequenceLikelihood(object): 51 | """ 52 | This enum represents the likelihood of a character following the previous one. 53 | """ 54 | NEGATIVE = 0 55 | UNLIKELY = 1 56 | LIKELY = 2 57 | POSITIVE = 3 58 | 59 | @classmethod 60 | def get_num_categories(cls): 61 | """:returns: The number of likelihood categories in the enum.""" 62 | return 4 63 | 64 | 65 | class CharacterCategory(object): 66 | """ 67 | This enum represents the different categories language models for 68 | ``SingleByteCharsetProber`` put characters into. 69 | 70 | Anything less than CONTROL is considered a letter. 71 | """ 72 | UNDEFINED = 255 73 | LINE_BREAK = 254 74 | SYMBOL = 253 75 | DIGIT = 252 76 | CONTROL = 251 77 | -------------------------------------------------------------------------------- /lambda_function/chardet/enums.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/enums.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/escprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/escprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/escsm.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/escsm.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/eucjpprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/eucjpprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/euckrfreq.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/euckrfreq.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKR_SM_MODEL 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(EUCKRProber, self).__init__() 37 | self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL) 38 | self.distribution_analyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | @property 42 | def charset_name(self): 43 | return "EUC-KR" 44 | 45 | @property 46 | def language(self): 47 | return "Korean" 48 | -------------------------------------------------------------------------------- /lambda_function/chardet/euckrprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/euckrprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/euctwfreq.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/euctwfreq.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTW_SM_MODEL 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | super(EUCTWProber, self).__init__() 36 | self.coding_sm = CodingStateMachine(EUCTW_SM_MODEL) 37 | self.distribution_analyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | @property 41 | def charset_name(self): 42 | return "EUC-TW" 43 | 44 | @property 45 | def language(self): 46 | return "Taiwan" 47 | -------------------------------------------------------------------------------- /lambda_function/chardet/euctwprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/euctwprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/gb2312freq.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/gb2312freq.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312_SM_MODEL 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | super(GB2312Prober, self).__init__() 36 | self.coding_sm = CodingStateMachine(GB2312_SM_MODEL) 37 | self.distribution_analyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | @property 41 | def charset_name(self): 42 | return "GB2312" 43 | 44 | @property 45 | def language(self): 46 | return "Chinese" 47 | -------------------------------------------------------------------------------- /lambda_function/chardet/gb2312prober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/gb2312prober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/hebrewprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/hebrewprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/jisfreq.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/jisfreq.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/jpcntx.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/jpcntx.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langbulgarianmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langbulgarianmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langcyrillicmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langcyrillicmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langgreekmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langgreekmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langhebrewmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langhebrewmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langhungarianmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langhungarianmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langthaimodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langthaimodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/langturkishmodel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/langturkishmodel.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/latin1prober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/latin1prober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/mbcharsetprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/mbcharsetprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/mbcsgroupprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # Proofpoint, Inc. 13 | # 14 | # This library is free software; you can redistribute it and/or 15 | # modify it under the terms of the GNU Lesser General Public 16 | # License as published by the Free Software Foundation; either 17 | # version 2.1 of the License, or (at your option) any later version. 18 | # 19 | # This library is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | # Lesser General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU Lesser General Public 25 | # License along with this library; if not, write to the Free Software 26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 27 | # 02110-1301 USA 28 | ######################### END LICENSE BLOCK ######################### 29 | 30 | from .charsetgroupprober import CharSetGroupProber 31 | from .utf8prober import UTF8Prober 32 | from .sjisprober import SJISProber 33 | from .eucjpprober import EUCJPProber 34 | from .gb2312prober import GB2312Prober 35 | from .euckrprober import EUCKRProber 36 | from .cp949prober import CP949Prober 37 | from .big5prober import Big5Prober 38 | from .euctwprober import EUCTWProber 39 | 40 | 41 | class MBCSGroupProber(CharSetGroupProber): 42 | def __init__(self, lang_filter=None): 43 | super(MBCSGroupProber, self).__init__(lang_filter=lang_filter) 44 | self.probers = [ 45 | UTF8Prober(), 46 | SJISProber(), 47 | EUCJPProber(), 48 | GB2312Prober(), 49 | EUCKRProber(), 50 | CP949Prober(), 51 | Big5Prober(), 52 | EUCTWProber() 53 | ] 54 | self.reset() 55 | -------------------------------------------------------------------------------- /lambda_function/chardet/mbcsgroupprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/mbcsgroupprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/mbcssm.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/mbcssm.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/sbcharsetprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/sbcharsetprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/sbcsgroupprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/sbcsgroupprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/sjisprober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/sjisprober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/universaldetector.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/universaldetector.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/utf8prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .charsetprober import CharSetProber 29 | from .enums import ProbingState, MachineState 30 | from .codingstatemachine import CodingStateMachine 31 | from .mbcssm import UTF8_SM_MODEL 32 | 33 | 34 | 35 | class UTF8Prober(CharSetProber): 36 | ONE_CHAR_PROB = 0.5 37 | 38 | def __init__(self): 39 | super(UTF8Prober, self).__init__() 40 | self.coding_sm = CodingStateMachine(UTF8_SM_MODEL) 41 | self._num_mb_chars = None 42 | self.reset() 43 | 44 | def reset(self): 45 | super(UTF8Prober, self).reset() 46 | self.coding_sm.reset() 47 | self._num_mb_chars = 0 48 | 49 | @property 50 | def charset_name(self): 51 | return "utf-8" 52 | 53 | @property 54 | def language(self): 55 | return "" 56 | 57 | def feed(self, byte_str): 58 | for c in byte_str: 59 | coding_state = self.coding_sm.next_state(c) 60 | if coding_state == MachineState.ERROR: 61 | self._state = ProbingState.NOT_ME 62 | break 63 | elif coding_state == MachineState.ITS_ME: 64 | self._state = ProbingState.FOUND_IT 65 | break 66 | elif coding_state == MachineState.START: 67 | if self.coding_sm.get_current_charlen() >= 2: 68 | self._num_mb_chars += 1 69 | 70 | if self.state == ProbingState.DETECTING: 71 | if self.get_confidence() > self.SHORTCUT_THRESHOLD: 72 | self._state = ProbingState.FOUND_IT 73 | 74 | return self.state 75 | 76 | def get_confidence(self): 77 | unlike = 0.99 78 | if self._num_mb_chars < 6: 79 | unlike *= self.ONE_CHAR_PROB ** self._num_mb_chars 80 | return 1.0 - unlike 81 | else: 82 | return unlike 83 | -------------------------------------------------------------------------------- /lambda_function/chardet/utf8prober.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/utf8prober.pyc -------------------------------------------------------------------------------- /lambda_function/chardet/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module exists only to simplify retrieving the version number of chardet 3 | from within setup.py and from chardet subpackages. 4 | 5 | :author: Dan Blanchard (dan.blanchard@gmail.com) 6 | """ 7 | 8 | __version__ = "3.0.4" 9 | VERSION = __version__.split('.') 10 | -------------------------------------------------------------------------------- /lambda_function/chardet/version.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/chardet/version.pyc -------------------------------------------------------------------------------- /lambda_function/idna/__init__.py: -------------------------------------------------------------------------------- 1 | from .package_data import __version__ 2 | from .core import * 3 | -------------------------------------------------------------------------------- /lambda_function/idna/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/idna/codec.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/codec.pyc -------------------------------------------------------------------------------- /lambda_function/idna/compat.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .codec import * 3 | 4 | def ToASCII(label): 5 | return encode(label) 6 | 7 | def ToUnicode(label): 8 | return decode(label) 9 | 10 | def nameprep(s): 11 | raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol") 12 | 13 | -------------------------------------------------------------------------------- /lambda_function/idna/compat.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/compat.pyc -------------------------------------------------------------------------------- /lambda_function/idna/core.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/core.pyc -------------------------------------------------------------------------------- /lambda_function/idna/idnadata.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/idnadata.pyc -------------------------------------------------------------------------------- /lambda_function/idna/intranges.py: -------------------------------------------------------------------------------- 1 | """ 2 | Given a list of integers, made up of (hopefully) a small number of long runs 3 | of consecutive integers, compute a representation of the form 4 | ((start1, end1), (start2, end2) ...). Then answer the question "was x present 5 | in the original list?" in time O(log(# runs)). 6 | """ 7 | 8 | import bisect 9 | 10 | def intranges_from_list(list_): 11 | """Represent a list of integers as a sequence of ranges: 12 | ((start_0, end_0), (start_1, end_1), ...), such that the original 13 | integers are exactly those x such that start_i <= x < end_i for some i. 14 | 15 | Ranges are encoded as single integers (start << 32 | end), not as tuples. 16 | """ 17 | 18 | sorted_list = sorted(list_) 19 | ranges = [] 20 | last_write = -1 21 | for i in range(len(sorted_list)): 22 | if i+1 < len(sorted_list): 23 | if sorted_list[i] == sorted_list[i+1]-1: 24 | continue 25 | current_range = sorted_list[last_write+1:i+1] 26 | ranges.append(_encode_range(current_range[0], current_range[-1] + 1)) 27 | last_write = i 28 | 29 | return tuple(ranges) 30 | 31 | def _encode_range(start, end): 32 | return (start << 32) | end 33 | 34 | def _decode_range(r): 35 | return (r >> 32), (r & ((1 << 32) - 1)) 36 | 37 | 38 | def intranges_contain(int_, ranges): 39 | """Determine if `int_` falls into one of the ranges in `ranges`.""" 40 | tuple_ = _encode_range(int_, 0) 41 | pos = bisect.bisect_left(ranges, tuple_) 42 | # we could be immediately ahead of a tuple (start, end) 43 | # with start < int_ <= end 44 | if pos > 0: 45 | left, right = _decode_range(ranges[pos-1]) 46 | if left <= int_ < right: 47 | return True 48 | # or we could be immediately behind a tuple (int_, end) 49 | if pos < len(ranges): 50 | left, _ = _decode_range(ranges[pos]) 51 | if left == int_: 52 | return True 53 | return False 54 | -------------------------------------------------------------------------------- /lambda_function/idna/intranges.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/intranges.pyc -------------------------------------------------------------------------------- /lambda_function/idna/package_data.py: -------------------------------------------------------------------------------- 1 | __version__ = '2.6' 2 | 3 | -------------------------------------------------------------------------------- /lambda_function/idna/package_data.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/package_data.pyc -------------------------------------------------------------------------------- /lambda_function/idna/uts46data.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/idna/uts46data.pyc -------------------------------------------------------------------------------- /lambda_function/phantomjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/phantomjs -------------------------------------------------------------------------------- /lambda_function/requests/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/requests/__version__.py: -------------------------------------------------------------------------------- 1 | # .-. .-. .-. . . .-. .-. .-. .-. 2 | # |( |- |.| | | |- `-. | `-. 3 | # ' ' `-' `-`.`-' `-' `-' ' `-' 4 | 5 | __title__ = 'requests' 6 | __description__ = 'Python HTTP for Humans.' 7 | __url__ = 'http://python-requests.org' 8 | __version__ = '2.18.4' 9 | __build__ = 0x021804 10 | __author__ = 'Kenneth Reitz' 11 | __author_email__ = 'me@kennethreitz.org' 12 | __license__ = 'Apache 2.0' 13 | __copyright__ = 'Copyright 2017 Kenneth Reitz' 14 | __cake__ = u'\u2728 \U0001f370 \u2728' 15 | -------------------------------------------------------------------------------- /lambda_function/requests/__version__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/__version__.pyc -------------------------------------------------------------------------------- /lambda_function/requests/_internal_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests._internal_utils 5 | ~~~~~~~~~~~~~~ 6 | 7 | Provides utility functions that are consumed internally by Requests 8 | which depend on extremely few external helpers (such as compat) 9 | """ 10 | 11 | from .compat import is_py2, builtin_str, str 12 | 13 | 14 | def to_native_string(string, encoding='ascii'): 15 | """Given a string object, regardless of type, returns a representation of 16 | that string in the native string type, encoding and decoding where 17 | necessary. This assumes ASCII unless told otherwise. 18 | """ 19 | if isinstance(string, builtin_str): 20 | out = string 21 | else: 22 | if is_py2: 23 | out = string.encode(encoding) 24 | else: 25 | out = string.decode(encoding) 26 | 27 | return out 28 | 29 | 30 | def unicode_is_ascii(u_string): 31 | """Determine if unicode string only contains ASCII characters. 32 | 33 | :param str u_string: unicode string to check. Must be unicode 34 | and not Python 2 `str`. 35 | :rtype: bool 36 | """ 37 | assert isinstance(u_string, str) 38 | try: 39 | u_string.encode('ascii') 40 | return True 41 | except UnicodeEncodeError: 42 | return False 43 | -------------------------------------------------------------------------------- /lambda_function/requests/_internal_utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/_internal_utils.pyc -------------------------------------------------------------------------------- /lambda_function/requests/adapters.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/adapters.pyc -------------------------------------------------------------------------------- /lambda_function/requests/api.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/api.pyc -------------------------------------------------------------------------------- /lambda_function/requests/auth.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/auth.pyc -------------------------------------------------------------------------------- /lambda_function/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | requests.certs 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. There is 9 | only one — the one from the certifi package. 10 | 11 | If you are packaging Requests, e.g., for a Linux distribution or a managed 12 | environment, you can change the definition of where() to return a separately 13 | packaged CA bundle. 14 | """ 15 | from certifi import where 16 | 17 | if __name__ == '__main__': 18 | print(where()) 19 | -------------------------------------------------------------------------------- /lambda_function/requests/certs.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/certs.pyc -------------------------------------------------------------------------------- /lambda_function/requests/compat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.compat 5 | ~~~~~~~~~~~~~~~ 6 | 7 | This module handles import compatibility issues between Python 2 and 8 | Python 3. 9 | """ 10 | 11 | import chardet 12 | 13 | import sys 14 | 15 | # ------- 16 | # Pythons 17 | # ------- 18 | 19 | # Syntax sugar. 20 | _ver = sys.version_info 21 | 22 | #: Python 2.x? 23 | is_py2 = (_ver[0] == 2) 24 | 25 | #: Python 3.x? 26 | is_py3 = (_ver[0] == 3) 27 | 28 | try: 29 | import simplejson as json 30 | except ImportError: 31 | import json 32 | 33 | # --------- 34 | # Specifics 35 | # --------- 36 | 37 | if is_py2: 38 | from urllib import ( 39 | quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, 40 | proxy_bypass, proxy_bypass_environment, getproxies_environment) 41 | from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag 42 | from urllib2 import parse_http_list 43 | import cookielib 44 | from Cookie import Morsel 45 | from StringIO import StringIO 46 | 47 | from urllib3.packages.ordered_dict import OrderedDict 48 | 49 | builtin_str = str 50 | bytes = str 51 | str = unicode 52 | basestring = basestring 53 | numeric_types = (int, long, float) 54 | integer_types = (int, long) 55 | 56 | elif is_py3: 57 | from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag 58 | from urllib.request import parse_http_list, getproxies, proxy_bypass, proxy_bypass_environment, getproxies_environment 59 | from http import cookiejar as cookielib 60 | from http.cookies import Morsel 61 | from io import StringIO 62 | from collections import OrderedDict 63 | 64 | builtin_str = str 65 | str = str 66 | bytes = bytes 67 | basestring = (str, bytes) 68 | numeric_types = (int, float) 69 | integer_types = (int,) 70 | -------------------------------------------------------------------------------- /lambda_function/requests/compat.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/compat.pyc -------------------------------------------------------------------------------- /lambda_function/requests/cookies.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/cookies.pyc -------------------------------------------------------------------------------- /lambda_function/requests/exceptions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/exceptions.pyc -------------------------------------------------------------------------------- /lambda_function/requests/help.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/help.pyc -------------------------------------------------------------------------------- /lambda_function/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | """ 14 | HOOKS = ['response'] 15 | 16 | 17 | def default_hooks(): 18 | return dict((event, []) for event in HOOKS) 19 | 20 | # TODO: response is the only one 21 | 22 | 23 | def dispatch_hook(key, hooks, hook_data, **kwargs): 24 | """Dispatches a hook dictionary on a given piece of data.""" 25 | hooks = hooks or dict() 26 | hooks = hooks.get(key) 27 | if hooks: 28 | if hasattr(hooks, '__call__'): 29 | hooks = [hooks] 30 | for hook in hooks: 31 | _hook_data = hook(hook_data, **kwargs) 32 | if _hook_data is not None: 33 | hook_data = _hook_data 34 | return hook_data 35 | -------------------------------------------------------------------------------- /lambda_function/requests/hooks.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/hooks.pyc -------------------------------------------------------------------------------- /lambda_function/requests/models.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/models.pyc -------------------------------------------------------------------------------- /lambda_function/requests/packages.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # This code exists for backwards compatibility reasons. 4 | # I don't like it either. Just look the other way. :) 5 | 6 | for package in ('urllib3', 'idna', 'chardet'): 7 | locals()[package] = __import__(package) 8 | # This traversal is apparently necessary such that the identities are 9 | # preserved (requests.packages.urllib3.* is urllib3.*) 10 | for mod in list(sys.modules): 11 | if mod == package or mod.startswith(package + '.'): 12 | sys.modules['requests.packages.' + mod] = sys.modules[mod] 13 | 14 | # Kinda cool, though, right? 15 | -------------------------------------------------------------------------------- /lambda_function/requests/packages.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/packages.pyc -------------------------------------------------------------------------------- /lambda_function/requests/sessions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/sessions.pyc -------------------------------------------------------------------------------- /lambda_function/requests/status_codes.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/status_codes.pyc -------------------------------------------------------------------------------- /lambda_function/requests/structures.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/structures.pyc -------------------------------------------------------------------------------- /lambda_function/requests/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/requests/utils.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | __version__ = "3.4.3" 20 | -------------------------------------------------------------------------------- /lambda_function/selenium/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from . import exceptions # noqa 19 | -------------------------------------------------------------------------------- /lambda_function/selenium/common/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/common/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/common/exceptions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/common/exceptions.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .firefox.webdriver import WebDriver as Firefox # noqa 19 | from .firefox.firefox_profile import FirefoxProfile # noqa 20 | from .chrome.webdriver import WebDriver as Chrome # noqa 21 | from .chrome.options import Options as ChromeOptions # noqa 22 | from .ie.webdriver import WebDriver as Ie # noqa 23 | from .edge.webdriver import WebDriver as Edge # noqa 24 | from .opera.webdriver import WebDriver as Opera # noqa 25 | from .safari.webdriver import WebDriver as Safari # noqa 26 | from .blackberry.webdriver import WebDriver as BlackBerry # noqa 27 | from .phantomjs.webdriver import WebDriver as PhantomJS # noqa 28 | from .android.webdriver import WebDriver as Android # noqa 29 | from .remote.webdriver import WebDriver as Remote # noqa 30 | from .common.desired_capabilities import DesiredCapabilities # noqa 31 | from .common.action_chains import ActionChains # noqa 32 | from .common.touch_actions import TouchActions # noqa 33 | from .common.proxy import Proxy # noqa 34 | 35 | __version__ = '3.5.0' 36 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/android/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/android/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/android/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/android/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 19 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 20 | 21 | 22 | class WebDriver(RemoteWebDriver): 23 | """ 24 | Simple RemoteWebDriver wrapper to start connect to Selendroid's WebView app 25 | 26 | For more info on getting started with Selendroid 27 | http://selendroid.io/mobileWeb.html 28 | """ 29 | 30 | def __init__(self, host="localhost", port=4444, desired_capabilities=DesiredCapabilities.ANDROID): 31 | """ 32 | Creates a new instance of Selendroid using the WebView app 33 | 34 | :Args: 35 | - host - location of where selendroid is running 36 | - port - port that selendroid is running on 37 | - desired_capabilities: Dictionary object with capabilities 38 | """ 39 | RemoteWebDriver.__init__( 40 | self, 41 | command_executor="http://%s:%d/wd/hub" % (host, port), 42 | desired_capabilities=desired_capabilities) 43 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/android/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/android/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/blackberry/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/blackberry/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/blackberry/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/blackberry/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/blackberry/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/chrome/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/options.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/chrome/options.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/remote_connection.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.remote_connection import RemoteConnection 19 | 20 | 21 | class ChromeRemoteConnection(RemoteConnection): 22 | 23 | def __init__(self, remote_server_addr, keep_alive=True): 24 | RemoteConnection.__init__(self, remote_server_addr, keep_alive) 25 | self._commands["launchApp"] = ('POST', '/session/$sessionId/chromium/launch_app') 26 | self._commands["setNetworkConditions"] = ('POST', '/session/$sessionId/chromium/network_conditions') 27 | self._commands["getNetworkConditions"] = ('GET', '/session/$sessionId/chromium/network_conditions') 28 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/remote_connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/chrome/remote_connection.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import service 19 | 20 | 21 | class Service(service.Service): 22 | """ 23 | Object that manages the starting and stopping of the ChromeDriver 24 | """ 25 | 26 | def __init__(self, executable_path, port=0, service_args=None, 27 | log_path=None, env=None): 28 | """ 29 | Creates a new instance of the Service 30 | 31 | :Args: 32 | - executable_path : Path to the ChromeDriver 33 | - port : Port the service is running on 34 | - service_args : List of args to pass to the chromedriver service 35 | - log_path : Path for the chromedriver service to log to""" 36 | 37 | self.service_args = service_args or [] 38 | if log_path: 39 | self.service_args.append('--log-path=%s' % log_path) 40 | 41 | service.Service.__init__(self, executable_path, port=port, env=env, 42 | start_error_message="Please see https://sites.google.com/a/chromium.org/chromedriver/home") 43 | 44 | def command_line_args(self): 45 | return ["--port=%d" % self.port] + self.service_args 46 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/chrome/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/chrome/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/chrome/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/action_chains.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/action_chains.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/action_builder.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.command import Command 19 | from . import interaction 20 | from .key_actions import KeyActions 21 | from .key_input import KeyInput 22 | from .pointer_actions import PointerActions 23 | from .pointer_input import PointerInput 24 | 25 | 26 | class ActionBuilder(object): 27 | def __init__(self, driver, mouse=None, keyboard=None): 28 | if mouse is None: 29 | mouse = PointerInput(interaction.POINTER, "mouse") 30 | if keyboard is None: 31 | keyboard = KeyInput(interaction.KEY) 32 | self.devices = [mouse, keyboard] 33 | self._key_action = KeyActions(keyboard) 34 | self._pointer_action = PointerActions(mouse) 35 | self.driver = driver 36 | 37 | def get_device_with(self, name): 38 | try: 39 | idx = self.devices.index(name) 40 | return self.devices[idx] 41 | except: 42 | pass 43 | 44 | @property 45 | def pointer_inputs(self): 46 | return [device for device in self.devices if device.type == interaction.POINTER] 47 | 48 | @property 49 | def key_inputs(self): 50 | return [device for device in self.devices if device.type == interaction.KEY] 51 | 52 | @property 53 | def key_action(self): 54 | return self._key_action 55 | 56 | @property 57 | def pointer_action(self): 58 | return self._pointer_action 59 | 60 | def add_key_input(self, name): 61 | new_input = KeyInput(name) 62 | self._add_input(new_input) 63 | return new_input 64 | 65 | def add_pointer_input(self, type_, name): 66 | new_input = PointerInput(type_, name) 67 | self._add_input(new_input) 68 | return new_input 69 | 70 | def perform(self): 71 | enc = {"actions": []} 72 | for device in self.devices: 73 | encoded = device.encode() 74 | if encoded['actions']: 75 | enc["actions"].append(encoded) 76 | self.driver.execute(Command.W3C_ACTIONS, enc) 77 | 78 | def clear_actions(self): 79 | self.driver.execute(Command.W3C_CLEAR_ACTIONS) 80 | 81 | def _add_input(self, input): 82 | self.devices.append(input) 83 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/action_builder.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/action_builder.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/input_device.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import uuid 19 | 20 | 21 | class InputDevice(object): 22 | """ 23 | Describes the input device being used for the action. 24 | """ 25 | def __init__(self, name=None): 26 | if name is None: 27 | self.name = uuid.uuid4() 28 | else: 29 | self.name = name 30 | 31 | self.actions = [] 32 | 33 | def add_action(self, action): 34 | """ 35 | 36 | """ 37 | self.actions.append(action) 38 | 39 | def clear_actions(self): 40 | self.actions = [] 41 | 42 | def create_pause(self, duraton=0): 43 | pass 44 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/input_device.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/input_device.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/interaction.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | KEY = "key" 20 | POINTER = "pointer" 21 | NONE = "none" 22 | SOURCE_TYPES = set([KEY, POINTER, NONE]) 23 | 24 | 25 | class Interaction(object): 26 | 27 | PAUSE = "pause" 28 | 29 | def __init__(self, source): 30 | self.source = source 31 | 32 | 33 | class Pause(Interaction): 34 | 35 | def __init__(self, source, duration=0): 36 | super(Interaction, self).__init__() 37 | self.source = source 38 | self.duration = duration 39 | 40 | def encode(self): 41 | output = {"type": self.PAUSE} 42 | output["duration"] = self.duration * 1000 43 | return output 44 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/interaction.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/interaction.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/key_actions.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | from .interaction import Interaction 18 | from .key_input import KeyInput 19 | from ..utils import keys_to_typing 20 | 21 | 22 | class KeyActions(Interaction): 23 | 24 | def __init__(self, source=None): 25 | if source is None: 26 | source = KeyInput() 27 | self.source = source 28 | super(KeyActions, self).__init__(source) 29 | 30 | def key_down(self, letter, element=None): 31 | return self._key_action("create_key_down", 32 | letter, element) 33 | 34 | def key_up(self, letter, element=None): 35 | return self._key_action("create_key_up", 36 | letter, element) 37 | 38 | def pause(self, duration=0): 39 | return self._key_action("create_pause", duration) 40 | 41 | def send_keys(self, text, element=None): 42 | if not isinstance(text, list): 43 | text = keys_to_typing(text) 44 | for letter in text: 45 | self.key_down(letter, element) 46 | self.key_up(letter, element) 47 | return self 48 | 49 | def _key_action(self, action, letter, element=None): 50 | meth = getattr(self.source, action) 51 | meth(letter) 52 | return self 53 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/key_actions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/key_actions.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/key_input.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | from . import interaction 18 | 19 | from .input_device import InputDevice 20 | from .interaction import (Interaction, 21 | Pause) 22 | 23 | 24 | class KeyInput(InputDevice): 25 | def __init__(self, name): 26 | super(KeyInput, self).__init__() 27 | self.name = name 28 | self.type = interaction.KEY 29 | 30 | def encode(self): 31 | return {"type": self.type, "id": self.name, "actions": [acts.encode() for acts in self.actions]} 32 | 33 | def create_key_down(self, key): 34 | self.add_action(TypingInteraction(self, "keyDown", key)) 35 | 36 | def create_key_up(self, key): 37 | self.add_action(TypingInteraction(self, "keyUp", key)) 38 | 39 | def create_pause(self, pause_duration=0): 40 | self.add_action(Pause(self, pause_duration)) 41 | 42 | 43 | class TypingInteraction(Interaction): 44 | 45 | def __init__(self, source, type_, key): 46 | super(TypingInteraction, self).__init__(source) 47 | self.type = type_ 48 | self.key = key 49 | 50 | def encode(self): 51 | return {"type": self.type, "value": self.key} 52 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/key_input.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/key_input.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/mouse_button.py: -------------------------------------------------------------------------------- 1 | class MouseButton(object): 2 | 3 | LEFT = 0 4 | MIDDLE = 1 5 | RIGHT = 2 6 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/mouse_button.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/mouse_button.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/pointer_actions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/pointer_actions.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/pointer_input.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | from .input_device import InputDevice 18 | 19 | from selenium.webdriver.remote.webelement import WebElement 20 | 21 | 22 | class PointerInput(InputDevice): 23 | 24 | DEFAULT_MOVE_DURATION = 250 25 | 26 | def __init__(self, type_, name): 27 | super(PointerInput, self).__init__() 28 | self.type = type_ 29 | self.name = name 30 | 31 | def create_pointer_move(self, duration=DEFAULT_MOVE_DURATION, x=None, y=None, origin=None): 32 | action = dict(type="pointerMove", duration=duration) 33 | action["x"] = x 34 | action["y"] = y 35 | if isinstance(origin, WebElement): 36 | action["origin"] = {"element-6066-11e4-a52e-4f735466cecf": origin.id} 37 | elif origin is not None: 38 | action["origin"] = origin 39 | 40 | self.add_action(action) 41 | 42 | def create_pointer_down(self, button): 43 | self.add_action({"type": "pointerDown", "duration": 0, "button": button}) 44 | 45 | def create_pointer_up(self, button): 46 | self.add_action({"type": "pointerUp", "duration": 0, "button": button}) 47 | 48 | def create_pointer_cancel(self): 49 | self.add_action({"type": "pointerCancel"}) 50 | 51 | def create_pause(self, pause_duration): 52 | self.add_action({"type": "pause", "duration": pause_duration * 1000}) 53 | 54 | def encode(self): 55 | return {"type": self.type, 56 | "parameters": {"pointerType": self.name}, 57 | "id": self.name, 58 | "actions": [acts for acts in self.actions]} 59 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/actions/pointer_input.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/actions/pointer_input.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/alert.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/alert.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/by.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ 19 | The By implementation. 20 | """ 21 | 22 | 23 | class By(object): 24 | """ 25 | Set of supported locator strategies. 26 | """ 27 | 28 | ID = "id" 29 | XPATH = "xpath" 30 | LINK_TEXT = "link text" 31 | PARTIAL_LINK_TEXT = "partial link text" 32 | NAME = "name" 33 | TAG_NAME = "tag name" 34 | CLASS_NAME = "class name" 35 | CSS_SELECTOR = "css selector" 36 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/by.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/by.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/desired_capabilities.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/desired_capabilities.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/html5/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/html5/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/html5/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/html5/application_cache.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ 19 | The ApplicationCache implementaion. 20 | """ 21 | 22 | from selenium.webdriver.remote.command import Command 23 | 24 | 25 | class ApplicationCache(object): 26 | 27 | UNCACHED = 0 28 | IDLE = 1 29 | CHECKING = 2 30 | DOWNLOADING = 3 31 | UPDATE_READY = 4 32 | OBSOLETE = 5 33 | 34 | def __init__(self, driver): 35 | """ 36 | Creates a new Aplication Cache. 37 | 38 | :Args: 39 | - driver: The WebDriver instance which performs user actions. 40 | """ 41 | self.driver = driver 42 | 43 | @property 44 | def status(self): 45 | """ 46 | Returns a current status of application cache. 47 | """ 48 | return self.driver.execute(Command.GET_APP_CACHE_STATUS)['value'] 49 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/html5/application_cache.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/html5/application_cache.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/keys.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ 19 | The Keys implementation. 20 | """ 21 | 22 | from __future__ import unicode_literals 23 | 24 | 25 | class Keys(object): 26 | """ 27 | Set of special keys codes. 28 | """ 29 | 30 | NULL = '\ue000' 31 | CANCEL = '\ue001' # ^break 32 | HELP = '\ue002' 33 | BACKSPACE = '\ue003' 34 | BACK_SPACE = BACKSPACE 35 | TAB = '\ue004' 36 | CLEAR = '\ue005' 37 | RETURN = '\ue006' 38 | ENTER = '\ue007' 39 | SHIFT = '\ue008' 40 | LEFT_SHIFT = SHIFT 41 | CONTROL = '\ue009' 42 | LEFT_CONTROL = CONTROL 43 | ALT = '\ue00a' 44 | LEFT_ALT = ALT 45 | PAUSE = '\ue00b' 46 | ESCAPE = '\ue00c' 47 | SPACE = '\ue00d' 48 | PAGE_UP = '\ue00e' 49 | PAGE_DOWN = '\ue00f' 50 | END = '\ue010' 51 | HOME = '\ue011' 52 | LEFT = '\ue012' 53 | ARROW_LEFT = LEFT 54 | UP = '\ue013' 55 | ARROW_UP = UP 56 | RIGHT = '\ue014' 57 | ARROW_RIGHT = RIGHT 58 | DOWN = '\ue015' 59 | ARROW_DOWN = DOWN 60 | INSERT = '\ue016' 61 | DELETE = '\ue017' 62 | SEMICOLON = '\ue018' 63 | EQUALS = '\ue019' 64 | 65 | NUMPAD0 = '\ue01a' # number pad keys 66 | NUMPAD1 = '\ue01b' 67 | NUMPAD2 = '\ue01c' 68 | NUMPAD3 = '\ue01d' 69 | NUMPAD4 = '\ue01e' 70 | NUMPAD5 = '\ue01f' 71 | NUMPAD6 = '\ue020' 72 | NUMPAD7 = '\ue021' 73 | NUMPAD8 = '\ue022' 74 | NUMPAD9 = '\ue023' 75 | MULTIPLY = '\ue024' 76 | ADD = '\ue025' 77 | SEPARATOR = '\ue026' 78 | SUBTRACT = '\ue027' 79 | DECIMAL = '\ue028' 80 | DIVIDE = '\ue029' 81 | 82 | F1 = '\ue031' # function keys 83 | F2 = '\ue032' 84 | F3 = '\ue033' 85 | F4 = '\ue034' 86 | F5 = '\ue035' 87 | F6 = '\ue036' 88 | F7 = '\ue037' 89 | F8 = '\ue038' 90 | F9 = '\ue039' 91 | F10 = '\ue03a' 92 | F11 = '\ue03b' 93 | F12 = '\ue03c' 94 | 95 | META = '\ue03d' 96 | COMMAND = '\ue03d' 97 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/keys.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/keys.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/proxy.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/proxy.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/touch_actions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/touch_actions.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/common/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/common/utils.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/edge/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/options.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 19 | 20 | 21 | class Options(object): 22 | 23 | def __init__(self): 24 | self._page_load_strategy = "normal" 25 | 26 | @property 27 | def page_load_strategy(self): 28 | return self._page_load_strategy 29 | 30 | @page_load_strategy.setter 31 | def page_load_strategy(self, value): 32 | if value not in ['normal', 'eager', 'none']: 33 | raise ValueError("Page Load Strategy should be 'normal', 'eager' or 'none'.") 34 | self._page_load_strategy = value 35 | 36 | def to_capabilities(self): 37 | """ 38 | Creates a capabilities with all the options that have been set and 39 | 40 | returns a dictionary with everything 41 | """ 42 | edge = DesiredCapabilities.EDGE.copy() 43 | edge['pageLoadStrategy'] = self._page_load_strategy 44 | 45 | return edge 46 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/options.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/edge/options.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import service 19 | 20 | 21 | class Service(service.Service): 22 | 23 | def __init__(self, executable_path, port=0, verbose=False, log_path=None): 24 | """ 25 | Creates a new instance of the EdgeDriver service. 26 | 27 | EdgeDriver provides an interface for Microsoft WebDriver to use 28 | with Microsoft Edge. 29 | 30 | :param executable_path: Path to the Microsoft WebDriver binary. 31 | :param port: Run the remote service on a specified port. 32 | Defaults to 0, which binds to a random open port of the 33 | system's choosing. 34 | :verbose: Whether to make the webdriver more verbose (passes the 35 | --verbose option to the binary). Defaults to False. 36 | :param log_path: Optional path for the webdriver binary to log to. 37 | Defaults to None which disables logging. 38 | 39 | """ 40 | 41 | self.service_args = [] 42 | if verbose: 43 | self.service_args.append("--verbose") 44 | 45 | params = { 46 | "executable": executable_path, 47 | "port": port, 48 | "start_error_message": "Please download from http://go.microsoft.com/fwlink/?LinkId=619687" 49 | } 50 | 51 | if log_path: 52 | params["log_file"] = open(log_path, "a+") 53 | 54 | service.Service.__init__(self, **params) 55 | 56 | def command_line_args(self): 57 | return ["--port=%d" % self.port] + self.service_args 58 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/edge/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import utils 19 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 20 | from selenium.webdriver.remote.remote_connection import RemoteConnection 21 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 22 | from .service import Service 23 | 24 | 25 | class WebDriver(RemoteWebDriver): 26 | 27 | def __init__(self, executable_path='MicrosoftWebDriver.exe', 28 | capabilities=None, port=0, verbose=False, log_path=None): 29 | self.port = port 30 | if self.port == 0: 31 | self.port = utils.free_port() 32 | 33 | self.edge_service = Service(executable_path, port=self.port, verbose=verbose, log_path=log_path) 34 | self.edge_service.start() 35 | 36 | if capabilities is None: 37 | capabilities = DesiredCapabilities.EDGE 38 | 39 | RemoteWebDriver.__init__( 40 | self, 41 | command_executor=RemoteConnection('http://localhost:%d' % self.port, 42 | resolve_ip=False), 43 | desired_capabilities=capabilities) 44 | self._is_remote = False 45 | 46 | def quit(self): 47 | RemoteWebDriver.quit(self) 48 | self.edge_service.stop() 49 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/edge/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/edge/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/extension_connection.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import logging 19 | import time 20 | 21 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 22 | from selenium.webdriver.common import utils 23 | from selenium.webdriver.remote.command import Command 24 | from selenium.webdriver.remote.remote_connection import RemoteConnection 25 | from selenium.webdriver.firefox.firefox_binary import FirefoxBinary 26 | 27 | LOGGER = logging.getLogger(__name__) 28 | PORT = 0 29 | HOST = None 30 | _URL = "" 31 | 32 | 33 | class ExtensionConnection(RemoteConnection): 34 | def __init__(self, host, firefox_profile, firefox_binary=None, timeout=30): 35 | self.profile = firefox_profile 36 | self.binary = firefox_binary 37 | HOST = host 38 | timeout = int(timeout) 39 | 40 | if self.binary is None: 41 | self.binary = FirefoxBinary() 42 | 43 | if HOST is None: 44 | HOST = "127.0.0.1" 45 | 46 | PORT = utils.free_port() 47 | self.profile.port = PORT 48 | self.profile.update_preferences() 49 | 50 | self.profile.add_extension() 51 | 52 | self.binary.launch_browser(self.profile, timeout=timeout) 53 | _URL = "http://%s:%d/hub" % (HOST, PORT) 54 | RemoteConnection.__init__( 55 | self, _URL, keep_alive=True) 56 | 57 | def quit(self, sessionId=None): 58 | self.execute(Command.QUIT, {'sessionId': sessionId}) 59 | while self.is_connectable(): 60 | LOGGER.info("waiting to quit") 61 | time.sleep(1) 62 | 63 | def connect(self): 64 | """Connects to the extension and retrieves the session id.""" 65 | return self.execute(Command.NEW_SESSION, 66 | {'desiredCapabilities': DesiredCapabilities.FIREFOX}) 67 | 68 | @classmethod 69 | def connect_and_quit(self): 70 | """Connects to an running browser and quit immediately.""" 71 | self._request('%s/extensions/firefox/quit' % _URL) 72 | 73 | @classmethod 74 | def is_connectable(self): 75 | """Trys to connect to the extension but do not retrieve context.""" 76 | utils.is_connectable(self.profile.port) 77 | 78 | 79 | class ExtensionConnectionError(Exception): 80 | """An internal error occurred int the extension. 81 | 82 | Might be caused by bad input or bugs in webdriver 83 | """ 84 | pass 85 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/extension_connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/extension_connection.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/firefox_binary.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/firefox_binary.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/firefox_profile.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/firefox_profile.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/options.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/options.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/remote_connection.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.remote_connection import RemoteConnection 19 | 20 | 21 | class FirefoxRemoteConnection(RemoteConnection): 22 | def __init__(self, remote_server_addr, keep_alive=True): 23 | RemoteConnection.__init__(self, remote_server_addr, keep_alive) 24 | 25 | self._commands["GET_CONTEXT"] = ('GET', '/session/$sessionId/moz/context') 26 | self._commands["SET_CONTEXT"] = ("POST", "/session/$sessionId/moz/context") 27 | self._commands["ELEMENT_GET_ANONYMOUS_CHILDREN"] = \ 28 | ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_children") 29 | self._commands["ELEMENT_FIND_ANONYMOUS_ELEMENTS_BY_ATTRIBUTE"] = \ 30 | ("POST", "/session/$sessionId/moz/xbl/$id/anonymous_by_attribute") 31 | self._commands["INSTALL_ADDON"] = \ 32 | ("POST", "/session/$sessionId/moz/addon/install") 33 | self._commands["UNINSTALL_ADDON"] = \ 34 | ("POST", "/session/$sessionId/moz/addon/uninstall") 35 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/remote_connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/remote_connection.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import service 19 | 20 | 21 | class Service(service.Service): 22 | """Object that manages the starting and stopping of the 23 | GeckoDriver.""" 24 | 25 | def __init__(self, executable_path, port=0, service_args=None, 26 | log_path="geckodriver.log", env=None): 27 | """Creates a new instance of the GeckoDriver remote service proxy. 28 | 29 | GeckoDriver provides a HTTP interface speaking the W3C WebDriver 30 | protocol to Marionette. 31 | 32 | :param executable_path: Path to the GeckoDriver binary. 33 | :param port: Run the remote service on a specified port. 34 | Defaults to 0, which binds to a random open port of the 35 | system's choosing. 36 | :param service_args: Optional list of arguments to pass to the 37 | GeckoDriver binary. 38 | :param log_path: Optional path for the GeckoDriver to log to. 39 | Defaults to _geckodriver.log_ in the current working directory. 40 | :param env: Optional dictionary of output variables to expose 41 | in the services' environment. 42 | 43 | """ 44 | log_file = open(log_path, "a+") if log_path is not None and log_path != "" else None 45 | 46 | service.Service.__init__( 47 | self, executable_path, port=port, log_file=log_file, env=env) 48 | self.service_args = service_args or [] 49 | 50 | def command_line_args(self): 51 | return ["--port", "%d" % self.port] + self.service_args 52 | 53 | def send_remote_shutdown_command(self): 54 | pass 55 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/webdriver.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/webdriver.xpi -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/webdriver_prefs.json: -------------------------------------------------------------------------------- 1 | { 2 | "frozen": { 3 | "app.update.auto": false, 4 | "app.update.enabled": false, 5 | "browser.displayedE10SNotice": 4, 6 | "browser.download.manager.showWhenStarting": false, 7 | "browser.EULA.override": true, 8 | "browser.EULA.3.accepted": true, 9 | "browser.link.open_external": 2, 10 | "browser.link.open_newwindow": 2, 11 | "browser.offline": false, 12 | "browser.reader.detectedFirstArticle": true, 13 | "browser.safebrowsing.enabled": false, 14 | "browser.safebrowsing.malware.enabled": false, 15 | "browser.search.update": false, 16 | "browser.selfsupport.url" : "", 17 | "browser.sessionstore.resume_from_crash": false, 18 | "browser.shell.checkDefaultBrowser": false, 19 | "browser.tabs.warnOnClose": false, 20 | "browser.tabs.warnOnOpen": false, 21 | "datareporting.healthreport.service.enabled": false, 22 | "datareporting.healthreport.uploadEnabled": false, 23 | "datareporting.healthreport.service.firstRun": false, 24 | "datareporting.healthreport.logging.consoleEnabled": false, 25 | "datareporting.policy.dataSubmissionEnabled": false, 26 | "datareporting.policy.dataSubmissionPolicyAccepted": false, 27 | "devtools.errorconsole.enabled": true, 28 | "dom.disable_open_during_load": false, 29 | "extensions.autoDisableScopes": 10, 30 | "extensions.blocklist.enabled": false, 31 | "extensions.checkCompatibility.nightly": false, 32 | "extensions.logging.enabled": true, 33 | "extensions.update.enabled": false, 34 | "extensions.update.notifyUser": false, 35 | "javascript.enabled": true, 36 | "network.manage-offline-status": false, 37 | "network.http.phishy-userpass-length": 255, 38 | "offline-apps.allow_by_default": true, 39 | "prompts.tab_modal.enabled": false, 40 | "security.fileuri.origin_policy": 3, 41 | "security.fileuri.strict_origin_policy": false, 42 | "signon.rememberSignons": false, 43 | "toolkit.networkmanager.disable": true, 44 | "toolkit.telemetry.prompted": 2, 45 | "toolkit.telemetry.enabled": false, 46 | "toolkit.telemetry.rejected": true, 47 | "xpinstall.signatures.required": false, 48 | "xpinstall.whitelist.required": false 49 | }, 50 | "mutable": { 51 | "browser.dom.window.dump.enabled": true, 52 | "browser.laterrun.enabled": false, 53 | "browser.newtab.url": "about:blank", 54 | "browser.newtabpage.enabled": false, 55 | "browser.startup.page": 0, 56 | "browser.startup.homepage": "about:blank", 57 | "browser.startup.homepage_override.mstone": "ignore", 58 | "browser.usedOnWindows10.introURL": "about:blank", 59 | "dom.max_chrome_script_run_time": 30, 60 | "dom.max_script_run_time": 30, 61 | "dom.report_all_js_exceptions": true, 62 | "javascript.options.showInConsole": true, 63 | "network.captive-portal-service.enabled": false, 64 | "security.csp.enable": false, 65 | "startup.homepage_welcome_url": "about:blank", 66 | "startup.homepage_welcome_url.additional": "about:blank", 67 | "webdriver_accept_untrusted_certs": true, 68 | "webdriver_assume_untrusted_issuer": true 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/webelement.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.webelement import WebElement as RemoteWebElement 19 | 20 | 21 | class FirefoxWebElement(RemoteWebElement): 22 | 23 | @property 24 | def anonymous_children(self): 25 | """Retrieve the anonymous children of this element in an XBL 26 | context. This is only available in chrome context. 27 | 28 | See the `anonymous content documentation 29 | `_ 30 | on MDN for more information. 31 | 32 | """ 33 | return self._execute( 34 | "ELEMENT_GET_ANONYMOUS_CHILDREN", 35 | {"value": None}) 36 | 37 | def find_anonymous_element_by_attribute(self, name, value): 38 | """Retrieve an anonymous descendant with a specified attribute 39 | value. Typically used with an (arbitrary) anonid attribute to 40 | retrieve a specific anonymous child in an XBL binding. 41 | 42 | See the `anonymous content documentation 43 | `_ 44 | on MDN for more information. 45 | 46 | """ 47 | return self._execute( 48 | "ELEMENT_FIND_ANONYMOUS_ELEMENTS_BY_ATTRIBUTE", 49 | {"name": name, "value": value})["value"] 50 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/webelement.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/webelement.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/firefox/x86/x_ignore_nofocus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/firefox/x86/x_ignore_nofocus.so -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/ie/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import service 19 | 20 | 21 | class Service(service.Service): 22 | """ 23 | Object that manages the starting and stopping of the IEDriver 24 | """ 25 | 26 | def __init__(self, executable_path, port=0, host=None, log_level=None, log_file=None): 27 | """ 28 | Creates a new instance of the Service 29 | 30 | :Args: 31 | - executable_path : Path to the IEDriver 32 | - port : Port the service is running on 33 | - host : IP address the service port is bound 34 | - log_level : Level of logging of service, may be "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE". 35 | Default is "FATAL". 36 | - log_file : Target of logging of service, may be "stdout", "stderr" or file path. 37 | Default is "stdout".""" 38 | self.service_args = [] 39 | if host is not None: 40 | self.service_args.append("--host=%s" % host) 41 | if log_level is not None: 42 | self.service_args.append("--log-level=%s" % log_level) 43 | if log_file is not None: 44 | self.service_args.append("--log-file=%s" % log_file) 45 | 46 | service.Service.__init__(self, executable_path, port=port, 47 | start_error_message="Please download from http://selenium-release.storage.googleapis.com/index.html and read up at https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver") 48 | 49 | def command_line_args(self): 50 | return ["--port=%d" % self.port] + self.service_args 51 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/ie/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import utils 19 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 20 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 21 | from .service import Service 22 | 23 | DEFAULT_TIMEOUT = 30 24 | DEFAULT_PORT = 0 25 | DEFAULT_HOST = None 26 | DEFAULT_LOG_LEVEL = None 27 | DEFAULT_LOG_FILE = None 28 | 29 | 30 | class WebDriver(RemoteWebDriver): 31 | 32 | def __init__(self, executable_path='IEDriverServer.exe', capabilities=None, 33 | port=DEFAULT_PORT, timeout=DEFAULT_TIMEOUT, host=DEFAULT_HOST, 34 | log_level=DEFAULT_LOG_LEVEL, log_file=DEFAULT_LOG_FILE): 35 | self.port = port 36 | if self.port == 0: 37 | self.port = utils.free_port() 38 | self.host = host 39 | self.log_level = log_level 40 | self.log_file = log_file 41 | 42 | self.iedriver = Service( 43 | executable_path, 44 | port=self.port, 45 | host=self.host, 46 | log_level=self.log_level, 47 | log_file=self.log_file) 48 | 49 | self.iedriver.start() 50 | 51 | if capabilities is None: 52 | capabilities = DesiredCapabilities.INTERNETEXPLORER 53 | 54 | RemoteWebDriver.__init__( 55 | self, 56 | command_executor='http://localhost:%d' % self.port, 57 | desired_capabilities=capabilities) 58 | self._is_remote = False 59 | 60 | def quit(self): 61 | RemoteWebDriver.quit(self) 62 | self.iedriver.stop() 63 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/ie/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/ie/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/opera/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/opera/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/opera/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/opera/options.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/opera/options.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/opera/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/opera/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/phantomjs/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | import os 18 | import tempfile 19 | from selenium.webdriver.common import service 20 | 21 | 22 | class Service(service.Service): 23 | """ 24 | Object that manages the starting and stopping of PhantomJS / Ghostdriver 25 | """ 26 | 27 | def __init__(self, executable_path, port=0, service_args=None, log_path=None): 28 | """ 29 | Creates a new instance of the Service 30 | 31 | :Args: 32 | - executable_path : Path to PhantomJS binary 33 | - port : Port the service is running on 34 | - service_args : A List of other command line options to pass to PhantomJS 35 | - log_path: Path for PhantomJS service to log to 36 | """ 37 | self.service_args = service_args 38 | if self.service_args is None: 39 | self.service_args = [] 40 | else: 41 | self.service_args = service_args[:] 42 | if not log_path: 43 | log_path = "ghostdriver.log" 44 | if not self._args_contain("--cookies-file="): 45 | self._cookie_temp_file_handle, self._cookie_temp_file = tempfile.mkstemp() 46 | self.service_args.append("--cookies-file=" + self._cookie_temp_file) 47 | else: 48 | self._cookie_temp_file = None 49 | 50 | service.Service.__init__(self, executable_path, port=port, log_file=open(log_path, 'w')) 51 | 52 | def _args_contain(self, arg): 53 | return len(list(filter(lambda x: x.startswith(arg), self.service_args))) > 0 54 | 55 | def command_line_args(self): 56 | return self.service_args + ["--webdriver=%d" % self.port] 57 | 58 | @property 59 | def service_url(self): 60 | """ 61 | Gets the url of the GhostDriver Service 62 | """ 63 | return "http://localhost:%d/wd/hub" % self.port 64 | 65 | def send_remote_shutdown_command(self): 66 | if self._cookie_temp_file: 67 | os.close(self._cookie_temp_file_handle) 68 | os.remove(self._cookie_temp_file) 69 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/phantomjs/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 19 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 20 | from .service import Service 21 | 22 | 23 | class WebDriver(RemoteWebDriver): 24 | """ 25 | Wrapper to communicate with PhantomJS through Ghostdriver. 26 | 27 | You will need to follow all the directions here: 28 | https://github.com/detro/ghostdriver 29 | """ 30 | 31 | def __init__(self, executable_path="phantomjs", 32 | port=0, desired_capabilities=DesiredCapabilities.PHANTOMJS, 33 | service_args=None, service_log_path=None): 34 | """ 35 | Creates a new instance of the PhantomJS / Ghostdriver. 36 | 37 | Starts the service and then creates new instance of the driver. 38 | 39 | :Args: 40 | - executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH 41 | - port - port you would like the service to run, if left as 0, a free port will be found. 42 | - desired_capabilities: Dictionary object with non-browser specific 43 | capabilities only, such as "proxy" or "loggingPref". 44 | - service_args : A List of command line arguments to pass to PhantomJS 45 | - service_log_path: Path for phantomjs service to log to. 46 | """ 47 | self.service = Service( 48 | executable_path, 49 | port=port, 50 | service_args=service_args, 51 | log_path=service_log_path) 52 | self.service.start() 53 | 54 | try: 55 | RemoteWebDriver.__init__( 56 | self, 57 | command_executor=self.service.service_url, 58 | desired_capabilities=desired_capabilities) 59 | except Exception: 60 | self.quit() 61 | raise 62 | 63 | self._is_remote = False 64 | 65 | def quit(self): 66 | """ 67 | Closes the browser and shuts down the PhantomJS executable 68 | that is started when starting the PhantomJS 69 | """ 70 | try: 71 | RemoteWebDriver.quit(self) 72 | except Exception: 73 | # We don't care about the message because something probably has gone wrong 74 | pass 75 | finally: 76 | self.service.stop() 77 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/phantomjs/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/phantomjs/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/command.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/command.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/errorhandler.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/errorhandler.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/file_detector.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import abc 19 | import os 20 | from selenium.webdriver.common.utils import keys_to_typing 21 | 22 | 23 | class FileDetector(object): 24 | """ 25 | Used for identifying whether a sequence of chars represents the path to a 26 | file. 27 | """ 28 | __metaclass__ = abc.ABCMeta 29 | 30 | @abc.abstractmethod 31 | def is_local_file(self, *keys): 32 | return 33 | 34 | 35 | class UselessFileDetector(FileDetector): 36 | """ 37 | A file detector that never finds anything. 38 | """ 39 | def is_local_file(self, *keys): 40 | return None 41 | 42 | 43 | class LocalFileDetector(FileDetector): 44 | """ 45 | Detects files on the local disk. 46 | """ 47 | def is_local_file(self, *keys): 48 | file_path = ''.join(keys_to_typing(keys)) 49 | 50 | if not file_path: 51 | return None 52 | 53 | try: 54 | if os.path.isfile(file_path): 55 | return file_path 56 | except Exception: 57 | pass 58 | return None 59 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/file_detector.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/file_detector.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/mobile.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .command import Command 19 | 20 | 21 | class Mobile(object): 22 | 23 | class ConnectionType(object): 24 | 25 | def __init__(self, mask): 26 | self.mask = mask 27 | 28 | @property 29 | def airplane_mode(self): 30 | return self.mask % 2 == 1 31 | 32 | @property 33 | def wifi(self): 34 | return (self.mask / 2) % 2 == 1 35 | 36 | @property 37 | def data(self): 38 | return (self.mask / 4) > 0 39 | 40 | ALL_NETWORK = ConnectionType(6) 41 | WIFI_NETWORK = ConnectionType(2) 42 | DATA_NETWORK = ConnectionType(4) 43 | AIRPLANE_MODE = ConnectionType(1) 44 | 45 | def __init__(self, driver): 46 | self._driver = driver 47 | 48 | @property 49 | def network_connection(self): 50 | return self.ConnectionType(self._driver.execute(Command.GET_NETWORK_CONNECTION)['value']) 51 | 52 | def set_network_connection(self, network): 53 | """ 54 | Set the network connection for the remote device. 55 | 56 | Example of setting airplane mode:: 57 | 58 | driver.mobile.set_network_connection(driver.mobile.AIRPLANE_MODE) 59 | """ 60 | mode = network.mask if isinstance(network, self.ConnectionType) else network 61 | return self.ConnectionType(self._driver.execute( 62 | Command.SET_NETWORK_CONNECTION, { 63 | 'name': 'network_connection', 64 | 'parameters': {'type': mode}})['value']) 65 | 66 | @property 67 | def context(self): 68 | """ 69 | returns the current context (Native or WebView). 70 | """ 71 | return self._driver.execute(Command.CURRENT_CONTEXT_HANDLE) 72 | 73 | @property 74 | def contexts(self): 75 | """ 76 | returns a list of available contexts 77 | """ 78 | return self._driver.execute(Command.CONTEXT_HANDLES) 79 | 80 | @context.setter 81 | def context(self, new_context): 82 | """ 83 | sets the current context 84 | """ 85 | self._driver.execute(Command.SWITCH_TO_CONTEXT, {"name": new_context}) 86 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/mobile.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/mobile.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/remote_connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/remote_connection.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/switch_to.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/switch_to.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/utils.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/remote/webelement.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/remote/webelement.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/safari/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import os 19 | from selenium.webdriver.common import service, utils 20 | from subprocess import PIPE 21 | 22 | 23 | class Service(service.Service): 24 | """ 25 | Object that manages the starting and stopping of the SafariDriver 26 | """ 27 | 28 | def __init__(self, executable_path, port=0, quiet=False): 29 | """ 30 | Creates a new instance of the Service 31 | 32 | :Args: 33 | - executable_path : Path to the SafariDriver 34 | - port : Port the service is running on """ 35 | 36 | if not os.path.exists(executable_path): 37 | raise Exception("SafariDriver requires Safari 10 on OSX El Capitan or greater") 38 | 39 | if port == 0: 40 | port = utils.free_port() 41 | 42 | self.quiet = quiet 43 | log = PIPE 44 | if quiet: 45 | log = open(os.devnull, 'w') 46 | service.Service.__init__(self, executable_path, port, log) 47 | 48 | def command_line_args(self): 49 | return ["-p", "%s" % self.port] 50 | 51 | @property 52 | def service_url(self): 53 | """ 54 | Gets the url of the SafariDriver Service 55 | """ 56 | return "http://localhost:%d" % self.port 57 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/service.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/safari/service.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | try: 19 | import http.client as http_client 20 | except ImportError: 21 | import httplib as http_client 22 | 23 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 24 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 25 | from .service import Service 26 | 27 | 28 | class WebDriver(RemoteWebDriver): 29 | """ 30 | Controls the SafariDriver and allows you to drive the browser. 31 | 32 | """ 33 | 34 | def __init__(self, port=0, executable_path="/usr/bin/safaridriver", 35 | desired_capabilities=DesiredCapabilities.SAFARI, quiet=False): 36 | """ 37 | Creates a new instance of the Safari driver. 38 | 39 | Starts the service and then creates new instance of Safari Driver. 40 | 41 | :Args: 42 | - port - port you would like the service to run, if left as 0, a free port will be found. 43 | - desired_capabilities: Dictionary object with desired capabilities (Can be used to provide various Safari switches). 44 | - quiet - set to True to suppress stdout and stderr of the driver 45 | """ 46 | self.service = Service(executable_path, port=port, quiet=quiet) 47 | self.service.start() 48 | 49 | RemoteWebDriver.__init__( 50 | self, 51 | command_executor=self.service.service_url, 52 | desired_capabilities=desired_capabilities) 53 | self._is_remote = False 54 | 55 | def quit(self): 56 | """ 57 | Closes the browser and shuts down the SafariDriver executable 58 | that is started when starting the SafariDriver 59 | """ 60 | try: 61 | RemoteWebDriver.quit(self) 62 | except http_client.BadStatusLine: 63 | pass 64 | finally: 65 | self.service.stop() 66 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/safari/webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/safari/webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/abstract_event_listener.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | class AbstractEventListener(object): 20 | """ 21 | Event listener must subclass and implement this fully or partially 22 | """ 23 | 24 | def before_navigate_to(self, url, driver): 25 | pass 26 | 27 | def after_navigate_to(self, url, driver): 28 | pass 29 | 30 | def before_navigate_back(self, driver): 31 | pass 32 | 33 | def after_navigate_back(self, driver): 34 | pass 35 | 36 | def before_navigate_forward(self, driver): 37 | pass 38 | 39 | def after_navigate_forward(self, driver): 40 | pass 41 | 42 | def before_find(self, by, value, driver): 43 | pass 44 | 45 | def after_find(self, by, value, driver): 46 | pass 47 | 48 | def before_click(self, element, driver): 49 | pass 50 | 51 | def after_click(self, element, driver): 52 | pass 53 | 54 | def before_change_value_of(self, element, driver): 55 | pass 56 | 57 | def after_change_value_of(self, element, driver): 58 | pass 59 | 60 | def before_execute_script(self, script, driver): 61 | pass 62 | 63 | def after_execute_script(self, script, driver): 64 | pass 65 | 66 | def before_close(self, driver): 67 | pass 68 | 69 | def after_close(self, driver): 70 | pass 71 | 72 | def before_quit(self, driver): 73 | pass 74 | 75 | def after_quit(self, driver): 76 | pass 77 | 78 | def on_exception(self, exception, driver): 79 | pass 80 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/abstract_event_listener.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/abstract_event_listener.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/color.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/color.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/event_firing_webdriver.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/event_firing_webdriver.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/events.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .abstract_event_listener import AbstractEventListener # noqa 19 | from .event_firing_webdriver import EventFiringWebDriver # noqa 20 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/events.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/events.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/expected_conditions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/expected_conditions.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/select.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/select.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/ui.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .select import Select # noqa 19 | from .wait import WebDriverWait # noqa 20 | -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/ui.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/ui.pyc -------------------------------------------------------------------------------- /lambda_function/selenium/webdriver/support/wait.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/selenium/webdriver/support/wait.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/_collections.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/_collections.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/connection.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/connectionpool.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/connectionpool.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/_securetransport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/_securetransport/__init__.py -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/_securetransport/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/_securetransport/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/_securetransport/bindings.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/_securetransport/bindings.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/_securetransport/low_level.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/_securetransport/low_level.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/appengine.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/appengine.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/ntlmpool.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/ntlmpool.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/pyopenssl.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/pyopenssl.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/securetransport.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/securetransport.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/contrib/socks.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/contrib/socks.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/exceptions.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/exceptions.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/fields.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/fields.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/filepost.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import codecs 3 | 4 | from uuid import uuid4 5 | from io import BytesIO 6 | 7 | from .packages import six 8 | from .packages.six import b 9 | from .fields import RequestField 10 | 11 | writer = codecs.lookup('utf-8')[3] 12 | 13 | 14 | def choose_boundary(): 15 | """ 16 | Our embarrassingly-simple replacement for mimetools.choose_boundary. 17 | """ 18 | return uuid4().hex 19 | 20 | 21 | def iter_field_objects(fields): 22 | """ 23 | Iterate over fields. 24 | 25 | Supports list of (k, v) tuples and dicts, and lists of 26 | :class:`~urllib3.fields.RequestField`. 27 | 28 | """ 29 | if isinstance(fields, dict): 30 | i = six.iteritems(fields) 31 | else: 32 | i = iter(fields) 33 | 34 | for field in i: 35 | if isinstance(field, RequestField): 36 | yield field 37 | else: 38 | yield RequestField.from_tuples(*field) 39 | 40 | 41 | def iter_fields(fields): 42 | """ 43 | .. deprecated:: 1.6 44 | 45 | Iterate over fields. 46 | 47 | The addition of :class:`~urllib3.fields.RequestField` makes this function 48 | obsolete. Instead, use :func:`iter_field_objects`, which returns 49 | :class:`~urllib3.fields.RequestField` objects. 50 | 51 | Supports list of (k, v) tuples and dicts. 52 | """ 53 | if isinstance(fields, dict): 54 | return ((k, v) for k, v in six.iteritems(fields)) 55 | 56 | return ((k, v) for k, v in fields) 57 | 58 | 59 | def encode_multipart_formdata(fields, boundary=None): 60 | """ 61 | Encode a dictionary of ``fields`` using the multipart/form-data MIME format. 62 | 63 | :param fields: 64 | Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`). 65 | 66 | :param boundary: 67 | If not specified, then a random boundary will be generated using 68 | :func:`mimetools.choose_boundary`. 69 | """ 70 | body = BytesIO() 71 | if boundary is None: 72 | boundary = choose_boundary() 73 | 74 | for field in iter_field_objects(fields): 75 | body.write(b('--%s\r\n' % (boundary))) 76 | 77 | writer(body).write(field.render_headers()) 78 | data = field.data 79 | 80 | if isinstance(data, int): 81 | data = str(data) # Backwards compatibility 82 | 83 | if isinstance(data, six.text_type): 84 | writer(body).write(data) 85 | else: 86 | body.write(data) 87 | 88 | body.write(b'\r\n') 89 | 90 | body.write(b('--%s--\r\n' % (boundary))) 91 | 92 | content_type = str('multipart/form-data; boundary=%s' % boundary) 93 | 94 | return body.getvalue(), content_type 95 | -------------------------------------------------------------------------------- /lambda_function/urllib3/filepost.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/filepost.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | __all__ = ('ssl_match_hostname', ) 6 | -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/backports/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/backports/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/backports/makefile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | backports.makefile 4 | ~~~~~~~~~~~~~~~~~~ 5 | 6 | Backports the Python 3 ``socket.makefile`` method for use with anything that 7 | wants to create a "fake" socket object. 8 | """ 9 | import io 10 | 11 | from socket import SocketIO 12 | 13 | 14 | def backport_makefile(self, mode="r", buffering=None, encoding=None, 15 | errors=None, newline=None): 16 | """ 17 | Backport of ``socket.makefile`` from Python 3.5. 18 | """ 19 | if not set(mode) <= set(["r", "w", "b"]): 20 | raise ValueError( 21 | "invalid mode %r (only r, w, b allowed)" % (mode,) 22 | ) 23 | writing = "w" in mode 24 | reading = "r" in mode or not writing 25 | assert reading or writing 26 | binary = "b" in mode 27 | rawmode = "" 28 | if reading: 29 | rawmode += "r" 30 | if writing: 31 | rawmode += "w" 32 | raw = SocketIO(self, rawmode) 33 | self._makefile_refs += 1 34 | if buffering is None: 35 | buffering = -1 36 | if buffering < 0: 37 | buffering = io.DEFAULT_BUFFER_SIZE 38 | if buffering == 0: 39 | if not binary: 40 | raise ValueError("unbuffered streams must be binary") 41 | return raw 42 | if reading and writing: 43 | buffer = io.BufferedRWPair(raw, raw, buffering) 44 | elif reading: 45 | buffer = io.BufferedReader(raw, buffering) 46 | else: 47 | assert writing 48 | buffer = io.BufferedWriter(raw, buffering) 49 | if binary: 50 | return buffer 51 | text = io.TextIOWrapper(buffer, encoding, errors, newline) 52 | text.mode = mode 53 | return text 54 | -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/backports/makefile.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/backports/makefile.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/ordered_dict.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/ordered_dict.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/six.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/six.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/ssl_match_hostname/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | try: 4 | # Our match_hostname function is the same as 3.5's, so we only want to 5 | # import the match_hostname function if it's at least that good. 6 | if sys.version_info < (3, 5): 7 | raise ImportError("Fallback to vendored code") 8 | 9 | from ssl import CertificateError, match_hostname 10 | except ImportError: 11 | try: 12 | # Backport of the function from a pypi module 13 | from backports.ssl_match_hostname import CertificateError, match_hostname 14 | except ImportError: 15 | # Our vendored copy 16 | from ._implementation import CertificateError, match_hostname 17 | 18 | # Not needed, but documenting what we provide. 19 | __all__ = ('CertificateError', 'match_hostname') 20 | -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/ssl_match_hostname/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/ssl_match_hostname/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/packages/ssl_match_hostname/_implementation.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/packages/ssl_match_hostname/_implementation.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/poolmanager.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/poolmanager.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/request.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/request.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/response.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/response.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | # For backwards compatibility, provide imports that used to be here. 3 | from .connection import is_connection_dropped 4 | from .request import make_headers 5 | from .response import is_fp_closed 6 | from .ssl_ import ( 7 | SSLContext, 8 | HAS_SNI, 9 | IS_PYOPENSSL, 10 | IS_SECURETRANSPORT, 11 | assert_fingerprint, 12 | resolve_cert_reqs, 13 | resolve_ssl_version, 14 | ssl_wrap_socket, 15 | ) 16 | from .timeout import ( 17 | current_time, 18 | Timeout, 19 | ) 20 | 21 | from .retry import Retry 22 | from .url import ( 23 | get_host, 24 | parse_url, 25 | split_first, 26 | Url, 27 | ) 28 | from .wait import ( 29 | wait_for_read, 30 | wait_for_write 31 | ) 32 | 33 | __all__ = ( 34 | 'HAS_SNI', 35 | 'IS_PYOPENSSL', 36 | 'IS_SECURETRANSPORT', 37 | 'SSLContext', 38 | 'Retry', 39 | 'Timeout', 40 | 'Url', 41 | 'assert_fingerprint', 42 | 'current_time', 43 | 'is_connection_dropped', 44 | 'is_fp_closed', 45 | 'get_host', 46 | 'parse_url', 47 | 'make_headers', 48 | 'resolve_cert_reqs', 49 | 'resolve_ssl_version', 50 | 'split_first', 51 | 'ssl_wrap_socket', 52 | 'wait_for_read', 53 | 'wait_for_write' 54 | ) 55 | -------------------------------------------------------------------------------- /lambda_function/urllib3/util/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/__init__.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/connection.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/connection.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/request.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/request.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/response.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from ..packages.six.moves import http_client as httplib 3 | 4 | from ..exceptions import HeaderParsingError 5 | 6 | 7 | def is_fp_closed(obj): 8 | """ 9 | Checks whether a given file-like object is closed. 10 | 11 | :param obj: 12 | The file-like object to check. 13 | """ 14 | 15 | try: 16 | # Check `isclosed()` first, in case Python3 doesn't set `closed`. 17 | # GH Issue #928 18 | return obj.isclosed() 19 | except AttributeError: 20 | pass 21 | 22 | try: 23 | # Check via the official file-like-object way. 24 | return obj.closed 25 | except AttributeError: 26 | pass 27 | 28 | try: 29 | # Check if the object is a container for another file-like object that 30 | # gets released on exhaustion (e.g. HTTPResponse). 31 | return obj.fp is None 32 | except AttributeError: 33 | pass 34 | 35 | raise ValueError("Unable to determine whether fp is closed.") 36 | 37 | 38 | def assert_header_parsing(headers): 39 | """ 40 | Asserts whether all headers have been successfully parsed. 41 | Extracts encountered errors from the result of parsing headers. 42 | 43 | Only works on Python 3. 44 | 45 | :param headers: Headers to verify. 46 | :type headers: `httplib.HTTPMessage`. 47 | 48 | :raises urllib3.exceptions.HeaderParsingError: 49 | If parsing errors are found. 50 | """ 51 | 52 | # This will fail silently if we pass in the wrong kind of parameter. 53 | # To make debugging easier add an explicit check. 54 | if not isinstance(headers, httplib.HTTPMessage): 55 | raise TypeError('expected httplib.Message, got {0}.'.format( 56 | type(headers))) 57 | 58 | defects = getattr(headers, 'defects', None) 59 | get_payload = getattr(headers, 'get_payload', None) 60 | 61 | unparsed_data = None 62 | if get_payload: # Platform-specific: Python 3. 63 | unparsed_data = get_payload() 64 | 65 | if defects or unparsed_data: 66 | raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) 67 | 68 | 69 | def is_response_to_head(response): 70 | """ 71 | Checks whether the request of a response has been a HEAD-request. 72 | Handles the quirks of AppEngine. 73 | 74 | :param conn: 75 | :type conn: :class:`httplib.HTTPResponse` 76 | """ 77 | # FIXME: Can we do this somehow without accessing private httplib _method? 78 | method = response._method 79 | if isinstance(method, int): # Platform-specific: Appengine 80 | return method == 3 81 | return method.upper() == 'HEAD' 82 | -------------------------------------------------------------------------------- /lambda_function/urllib3/util/response.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/response.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/retry.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/retry.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/selectors.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/selectors.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/ssl_.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/ssl_.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/timeout.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/timeout.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/url.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/url.pyc -------------------------------------------------------------------------------- /lambda_function/urllib3/util/wait.py: -------------------------------------------------------------------------------- 1 | from .selectors import ( 2 | HAS_SELECT, 3 | DefaultSelector, 4 | EVENT_READ, 5 | EVENT_WRITE 6 | ) 7 | 8 | 9 | def _wait_for_io_events(socks, events, timeout=None): 10 | """ Waits for IO events to be available from a list of sockets 11 | or optionally a single socket if passed in. Returns a list of 12 | sockets that can be interacted with immediately. """ 13 | if not HAS_SELECT: 14 | raise ValueError('Platform does not have a selector') 15 | if not isinstance(socks, list): 16 | # Probably just a single socket. 17 | if hasattr(socks, "fileno"): 18 | socks = [socks] 19 | # Otherwise it might be a non-list iterable. 20 | else: 21 | socks = list(socks) 22 | with DefaultSelector() as selector: 23 | for sock in socks: 24 | selector.register(sock, events) 25 | return [key[0].fileobj for key in 26 | selector.select(timeout) if key[1] & events] 27 | 28 | 29 | def wait_for_read(socks, timeout=None): 30 | """ Waits for reading to be available from a list of sockets 31 | or optionally a single socket if passed in. Returns a list of 32 | sockets that can be read from immediately. """ 33 | return _wait_for_io_events(socks, EVENT_READ, timeout) 34 | 35 | 36 | def wait_for_write(socks, timeout=None): 37 | """ Waits for writing to be available from a list of sockets 38 | or optionally a single socket if passed in. Returns a list of 39 | sockets that can be written to immediately. """ 40 | return _wait_for_io_events(socks, EVENT_WRITE, timeout) 41 | -------------------------------------------------------------------------------- /lambda_function/urllib3/util/wait.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/lambda_function/urllib3/util/wait.pyc -------------------------------------------------------------------------------- /modulelist.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "module": { 4 | "S": "mod1" 5 | }, 6 | "testcases": { 7 | "L": [ 8 | { 9 | "S": "tc001" 10 | }, 11 | { 12 | "S": "tc002" 13 | } 14 | ] 15 | } 16 | }, 17 | { 18 | "module": { 19 | "S": "mod2" 20 | }, 21 | "testcases": { 22 | "L": [ 23 | { 24 | "S": "tc003" 25 | }, 26 | { 27 | "S": "tc004" 28 | } 29 | ] 30 | } 31 | }, 32 | { 33 | "module": { 34 | "S": "mod3" 35 | }, 36 | "testcases": { 37 | "L": [ 38 | { 39 | "S": "tc001" 40 | }, 41 | { 42 | "S": "tc003" 43 | }, 44 | { 45 | "S": "tc005" 46 | } 47 | ] 48 | } 49 | } 50 | ] 51 | -------------------------------------------------------------------------------- /prepare_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | import boto3 5 | import json 6 | import traceback 7 | import os 8 | 9 | ddb_table = os.environ['ModuleTable'] 10 | 11 | 12 | def create_modules(): 13 | try: 14 | with open('modulelist.json') as modulelist: 15 | modlist = json.load(modulelist) 16 | ddb = boto3.client('dynamodb') 17 | for mod in modlist: 18 | res = ddb.put_item(TableName=ddb_table, Item=mod) 19 | print('Response for the insertion of module:' + mod['module']['S']) 20 | print(res) 21 | except: 22 | print('Failed! Debug further.') 23 | traceback.print_exc() 24 | 25 | 26 | if __name__ == '__main__': 27 | create_modules() 28 | -------------------------------------------------------------------------------- /status/index.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | 10 | Test Status 11 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Test Status!!! 42 | 43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /webdrivers/chromedriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/webdrivers/chromedriver -------------------------------------------------------------------------------- /webdrivers/geckodriver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/webdrivers/geckodriver -------------------------------------------------------------------------------- /website/button_click.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | AWS CodeBuild automation - Button Click. 10 | 11 | 12 | 13 | 28 |

Click the button...

29 | 30 | 31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /website/check_box.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | AWS CodeBuild automation - Check Box. 10 | 11 | 12 | 13 | 20 |

Check the box...

21 |
22 | Checkbox 1
23 |
24 | Checkbox 2
25 |
26 | Checkbox 3
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /website/dropdown.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | AWS CodeBuild automation - Dropdown. 10 | 11 | 12 | 13 | 43 |

Select from the dropdown...

44 |
45 | 53 |

54 |
55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /website/images.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | AWS CodeBuild automation - Images. 10 | 11 | 12 | 13 | 22 |

Some images to test.

23 | Test Image 1 24 | Test Image 2 25 | Broken Image 26 | 27 | 28 | -------------------------------------------------------------------------------- /website/index.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | AWS CodeBuild automation. 9 | 10 | 11 | 12 |

AWS CodeBuild automated UI testing website.

13 |

List of checks:

14 |
    15 |
  1. Button Click
  2. 16 |
  3. Check Box
  4. 17 |
  5. Dropdown
  6. 18 |
  7. Images
  8. 19 |
  9. Key Press
  10. 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /website/key_press.html: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | AWS CodeBuild automation - Key Press. 10 | 11 | 12 | 13 | 14 | 15 | 25 |
26 |

Try any of the key strokes (e.g. Space, Tab, enter, etc.).

27 |

28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /website/test1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/website/test1.png -------------------------------------------------------------------------------- /website/test2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/serverless-automated-ui-testing/8745afe7fdddc0b8e60980ad4b3f58a294c8206b/website/test2.png -------------------------------------------------------------------------------- /xvfb.init: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # /etc/rc.d/init.d/xvfbd 4 | # 5 | # chkconfig: 345 95 28 6 | # description: Starts/Stops X Virtual Framebuffer server 7 | # processname: Xvfb 8 | # 9 | 10 | 11 | [ "${NETWORKING}" = "no" ] && exit 0 12 | 13 | PROG="/usr/bin/Xvfb" 14 | PROG_OPTIONS=":5 -ac" 15 | PROG_OUTPUT="/tmp/Xvfb.out" 16 | 17 | case "$1" in 18 | start) 19 | echo -n "Starting : X Virtual Frame Buffer " 20 | $PROG $PROG_OPTIONS>>$PROG_OUTPUT 2>&1 & 21 | disown -ar 22 | ;; 23 | stop) 24 | echo -n "Shutting down : X Virtual Frame Buffer" 25 | killproc $PROG 26 | RETVAL=$? 27 | [ $RETVAL -eq 0 ] && /bin/rm -f /var/lock/subsys/Xvfb 28 | /var/run/Xvfb.pid 29 | echo 30 | ;; 31 | restart|reload) 32 | $0 stop 33 | $0 start 34 | RETVAL=$? 35 | ;; 36 | status) 37 | status Xvfb 38 | RETVAL=$? 39 | ;; 40 | *) 41 | echo $"Usage: $0 (start|stop|restart|reload|status)" 42 | exit 1 43 | esac 44 | 45 | exit $RETVAL 46 | --------------------------------------------------------------------------------