appium / appium/java-client

List element annotation unsupported for kotlin

Open
#1,257 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Description

Hi, i have an element as annotation in List of WebElement/MobileElement code below

image

in Java, i could access the element directly with the provided index. but in kotlin when i called the element with btnArrival0to6[1].click() it throws
Method threw 'kotlin.UninitializedPropertyAccessException' exception.

Environment

  • java client build version : 6.1.0
  • Appium server version or git revision if you use some shapshot:
  • Desktop OS/version used to run Appium if necessary:
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
  • Mobile platform/version under test:
  • Real device or emulator/simulator:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining Kotlin access to the annotated List<WebElement/MobileElement> described in the issue and reproduce the failure at btnArrival0to6[1].click(). Compare this behavior with the reported Java access pattern; done means the list element can be accessed by index in Kotlin without UninitializedPropertyAccessException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.