Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Plugins API: ability to add query methods #173

Open

Description

@SevInf

For now, css selectors is the only abailable method of querying elements. We need plugin API which allows users to add custom query methods.

Activity

  1. plisovyi commented on Aug 26, 2015

    @plisovyi

    @SevInf do you think implementing this functionality as plugin is the best way?
    I was thinking, maybe it should be configurable by option in .gemini.yml (queryType, for example) and maybe (not sure if needed), it could be made possible to override it specifically in methods?

    Possible selenium queries in wd are:

    elementByClassName(value, cb) -> cb(err, element)
    elementByCssSelector(value, cb) -> cb(err, element)
    elementById(value, cb) -> cb(err, element)
    elementByName(value, cb) -> cb(err, element)
    elementByLinkText(value, cb) -> cb(err, element)
    elementByPartialLinkText(value, cb) -> cb(err, element)
    elementByTagName(value, cb) -> cb(err, element)
    elementByXPath(value, cb) -> cb(err, element)
    elementByCss(value, cb) -> cb(err, element)
    elementByIosUIAutomation(value, cb) -> cb(err, element)
    elementByAndroidUIAutomator(value, cb) -> cb(err, element)
    elementByAccessibilityId(value, cb) -> cb(err, element)
    

    and obviously lots of them are interchangeable by css/sizzle (className, CssSelector, Id…)

    Maybe it's just more useful to implement those step-by-step in a core gemini, and made configurable, with default as css selectors / sizzle (for backward compatibility and as most capable one) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions