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

Enhanced to generate and support text based Xpaths #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kherath17
Copy link

@kherath17 kherath17 commented Nov 22, 2023

This PR Contains changes to generate text based xpaths and resolves below bug reported.

Changes done

  1. Created a new elementcreator class to extract the innerText
  2. Created a corresponding method to refer to the above elementCreator
  3. Created a new method as constructXPath to generate a xpath
  4. Introduced a new logic to resolve the locator in toLocator method by using constructXPath if elements.size() == 1 returns false

Eg:
By.xpath("//div[text()='Environment Configuration']")

Bug - #253

Note

This fix was tested for Kubernetes as well by simply overriding the hlm-web dependency found as a transitive dependency within healenium-appium for hlm-proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant