Skip to content

Conversation

@laura-codess
Copy link

Changes

I researched how we can make a very robust button clicking logic using Selenium best practices. I added this new general function into generalUtils.ts and replaced the MCP test suite with this logic so it no longer flakes.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laura-codess laura-codess requested a review from a team as a code owner August 13, 2025 19:30
@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

buttonWrapperSelector: string,
buttonContentSelector: string,
buttonName: string = 'button',
timeout: number = 5000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering but is this timeout just arbitrary or needed for waiting for the css?

.getDriver()
.wait(until.elementLocated(By.css(buttonContentSelector)), timeout, `${buttonName} content not found`)

const button = await buttonContent.findElement(By.xpath('./..'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this xpath do? A little curious since it seems new

Copy link

@surajrdy-aws surajrdy-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I see try catches within the clickButton but I think it will still error out correctly right?

@bywang56 bywang56 merged commit 2baf460 into aws:feature/ui-e2e-tests Aug 14, 2025
22 checks passed
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.

3 participants