microsoft / microsoft/playwright-java

[Feature] Kotlin support / extensions

Open
#1,293 9 comments 26 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
Dominant language
Java
Stars
1.6k
Forks
298
Avg merge
3d 2h
Merged PRs (30d)
14

Description

Kotlin is a very popular JVM language, and playwright could expose some Kotlin extensions that augment the existing API.

A small example would be infix/operator functions for or and and:

infix fun Locator.or(other: Locator) = or(other)
infix fun Locator.and(other: Locator) = and(other)

// usage like
println(page.locator("div") or page.locator("span"))

Because Kotlin is backwards compatible with Java, it's a possibility that this entire library could be converted to Kotlin, and there would be no disruption to end users using Java (or Scala, or Groovy etc).

  • Related #473

Contributor guide

Open the contributing guide

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 reviewing related issue #473 and the existing Locator API, especially the proposed Kotlin infix and operator extensions for or and and. The issue does not define whether the goal is a small extension set or conversion of the library, so completion requires an agreed scope before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
api, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.