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
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
# 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']),
def get_current_version(): current = library_version() print('The current version is {}, type a new one'.format( MESSAGE_YELLOW.format(current))) return current
# # 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',
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