Skip to content

Commit

Permalink
feat: Added typing for AppiumBy types
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijeshkrishna committed Nov 28, 2024
1 parent ea61c2e commit 19feaaa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions appium/webdriver/common/appiumby.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Literal

from selenium.webdriver.common.by import By


Expand All @@ -32,3 +34,19 @@ class AppiumBy(By):
FLUTTER_INTEGRATION_KEY = '-flutter key'
FLUTTER_INTEGRATION_TEXT = '-flutter text'
FLUTTER_INTEGRATION_TEXT_CONTAINING = '-flutter text containing'

ByType = Literal[
"-ios predicate string",
"-ios class chain",
"-android uiautomator",
"-android viewtag",
"-android datamatcher",
"-android viewmatcher",
"accessibility id",
"-image",
"-custom",
"-flutter semantics label",
"-flutter type",
"-flutter key",
"-flutter text containing",
]

0 comments on commit 19feaaa

Please sign in to comment.