Skip to content

Commit

Permalink
moved all xcuitest/general options to general_options.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsuryaprasad committed Jul 3, 2023
1 parent d87a0c4 commit aac90f4
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 83 deletions.
3 changes: 1 addition & 2 deletions appium/options/ios/xcuitest/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
)

from .app.app_options import AppInstallStrategyOption, AppPushTimeoutOption, LocalizableStringsDirOption
from .general.include_device_caps_to_session_info_option import IncludeDeviceCapsToSessionInfoOption
from .general.reset_location_service_option import ResetLocationServiceOption
from .general.general_options import IncludeDeviceCapsToSessionInfoOption, ResetLocationServiceOption
from .other.other_options import CommandTimeoutsOption, LaunchWithIdbOption, ShowIosLogOption, UseJsonSourceOption
from .simulator.simulator_options import (
CalendarAccessAuthorizedOption,
Expand Down
77 changes: 77 additions & 0 deletions appium/options/ios/xcuitest/general/general_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# 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.

from typing import Optional

from appium.options.base_options_descriptor import OptionsDescriptor
from appium.options.common.supports_capabilities import SupportsCapabilities


class IncludeDeviceCapsToSessionInfoOption(SupportsCapabilities):
INCLUDE_DEVICE_CAPS_TO_SESSION_INFO = "includeDeviceCapsToSessionInfo"
include_device_caps_to_session_info = OptionsDescriptor[Optional[bool], bool](INCLUDE_DEVICE_CAPS_TO_SESSION_INFO)
"""
Whether to include screen information as the result of Get Session Capabilities.
It includes pixelRatio, statBarHeight and viewportRect, but
it causes an extra API call to WDA which may increase the response time.
Defaults to true.
Usage
-----
- Get
- `self.include_device_caps_to_session_info`
- Set
- `self.include_device_caps_to_session_info` = `value`
Properties
----------
`value`: `bool`
Returns
-------
- Get
- `Optional[bool]`
- Set
- `None`
"""


class ResetLocationServiceOption(SupportsCapabilities):
RESET_LOCATION_SERVICE = "resetLocationService"
reset_location_service = OptionsDescriptor[Optional[bool], bool](RESET_LOCATION_SERVICE)
"""
Whether reset the location service in the session deletion on real devices.
Defaults to false.
Usage
-----
- Get
- `self.reset_location_service`
- Set
- `self.reset_location_service` = `value`
Parameters
----------
`value`: `bool`
Returns
-------
- Get
- `Optional[bool]`
- Set
- `None`
"""

This file was deleted.

This file was deleted.

Loading

0 comments on commit aac90f4

Please sign in to comment.