def get_remote_connection_headers(cls, parsed_url, keep_alive=False):
        """Override get_remote_connection_headers in RemoteConnection"""
        headers = RemoteConnection.get_remote_connection_headers(
            parsed_url, keep_alive=keep_alive)
        headers['User-Agent'] = 'appium/python {} ({})'.format(
            library_version(), headers['User-Agent'])

        return headers
示例#2
0
    def get_remote_connection_headers(cls, parsed_url, keep_alive=True):
        """Override get_remote_connection_headers in RemoteConnection"""
        headers = RemoteConnection.get_remote_connection_headers(
            parsed_url, keep_alive=keep_alive)
        headers['User-Agent'] = 'appium/python {} ({})'.format(
            library_version(), headers['User-Agent'])
        if parsed_url.path.endswith('/session'):
            # https://github.com/appium/appium-base-driver/pull/400
            headers['X-Idempotency-Key'] = str(uuid.uuid4())

        return headers
示例#3
0
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import os

from setuptools import find_packages, setup

from appium.common.helper import library_version

setup(name='Appium-Python-Client',
      version=library_version(),
      description='Python client for Appium',
      long_description=io.open(os.path.join(os.path.dirname('__file__'),
                                            'README.md'),
                               encoding='utf-8').read(),
      long_description_content_type='text/markdown',
      keywords=[
          'appium', 'selenium', 'selenium 3', 'python client',
          'mobile automation'
      ],
      author='Isaac Murchie',
      author_email='*****@*****.**',
      maintainer='Kazuaki Matsuo, Mykola Mokhnach, Mori Atsushi',
      url='http://appium.io/',
      package_data={'appium': ['webdriver/py.typed']},
      packages=find_packages(include=['appium']),
示例#4
0
def get_current_version():
    current = library_version()
    print('The current version is {}, type a new one'.format(
        MESSAGE_YELLOW.format(current)))
    return current
示例#5
0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import os

from distutils.core import setup
from setuptools import setup
from appium.common.helper import library_version

setup(
    name='Appium-Python-Client',
    version=library_version(),
    description='Python client for Appium',
    long_description=io.open(os.path.join(os.path.dirname('__file__'), 'README.md'), encoding='utf-8').read(),
    long_description_content_type='text/markdown',
    keywords=[
        'appium',
        'selenium',
        'selenium 3',
        'python client',
        'mobile automation'
    ],
    author='Isaac Murchie',
    author_email='*****@*****.**',
    url='http://appium.io/',
    packages=[
        'appium',
示例#6
0
    def get_remote_connection_headers(cls, parsed_url, keep_alive=False):
        """Override get_remote_connection_headers in RemoteConnection"""
        headers = RemoteConnection.get_remote_connection_headers(parsed_url, keep_alive=keep_alive)
        headers['User-Agent'] = 'appium/python {} ({})'.format(library_version(), headers['User-Agent'])

        return headers