Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$$ and $$x are missing for Appium selectors #2333

Closed
kamil1014 opened this issue Jun 12, 2023 · 5 comments · Fixed by #2656
Closed

$$ and $$x are missing for Appium selectors #2333

kamil1014 opened this issue Jun 12, 2023 · 5 comments · Fixed by #2656
Assignees
Milestone

Comments

@kamil1014
Copy link

kamil1014 commented Jun 12, 2023

The problem

There are missing $$ and $$x operators for finding Appium collections of elements.
There are only $ and $x operators in SelenideAppium class.

Details

If there is other way to get collection of appium elements using Selenide please let me know.

Tell us about your environment

  • Selenide-Appium Version: 6.15.0
  • OS Version: Windows 10

Code To Reproduce Issue

$$(byText("text"))
@amuthansakthivel
Copy link
Contributor

amuthansakthivel commented Jun 14, 2023

@kamil1014 - For now, you can still use Selenide.$$(by)

I will create a PR to have it in SelenideAppium class as well

@amuthansakthivel
Copy link
Contributor

amuthansakthivel commented Jun 14, 2023

@asolntsev we may also want to include

public SelenideAppiumElement $(WebElement element){
  //logic to return SelenideAppiumElement;
}

Also when using pagefactory, we should provide an option to use SelenideAppiumElement reference

  @AndroidFindBy(xpath = "//android.view.ViewGroup[@content-desc=\"store item\"]")
  @iOSXCUITFindBy(xpath = "//*[@name='store item text']")
  private SelenideAppiumElement products;

@Bpete1979
Copy link

Thanks, came a cross the same issue.

@asolntsev
Copy link
Member

we should provide an option to use SelenideAppiumElement reference

It already works. You can declare PO fields (annotated by @AndroidFindBy / @iOSXCUITFindBy) as SelenideAppiumElement.

@asolntsev
Copy link
Member

asolntsev commented Feb 20, 2024

There are missing $$ and $$x operators for finding Appium collections of elements.

@kamil1014 @amuthansakthivel
May I ask WHY do you need collection of SelenideAppiumElements?
What are you going to do with such a collection?

The point of collection is to check texts/attributes of multiple elements with a single call. And it's totally possible with the current ElementsCollection. What feature are you actually missing?

@asolntsev asolntsev self-assigned this Feb 20, 2024
asolntsev added a commit that referenced this issue Feb 20, 2024
this commit introduces new type SelenideAppiumCollection which is a collection of SelenideAppiumElement's (like ElementsCollection is a collection of SelenideElement's).
@asolntsev asolntsev added this to the 7.1.1 milestone Feb 21, 2024
@asolntsev asolntsev linked a pull request Feb 21, 2024 that will close this issue
asolntsev added a commit that referenced this issue Feb 21, 2024
this commit introduces new type SelenideAppiumCollection which is a collection of SelenideAppiumElement's (like ElementsCollection is a collection of SelenideElement's).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants