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

tap position option doesn't offset the position as requested #471

Open
ankur22 opened this issue Jul 27, 2022 · 0 comments
Open

tap position option doesn't offset the position as requested #471

ankur22 opened this issue Jul 27, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Suitable for Hacktoberfest 🎉

Comments

@ankur22
Copy link
Collaborator

ankur22 commented Jul 27, 2022

Tested against: dbede12

Using position option on locator methods that has it doesn't offset the position as requested.

In the below code it works against localhost:8080, which is a test server that can be found here with instructions on how to run it locally: https://github.com/ankur22/testserver.

import { sleep } from 'k6';
import launcher from 'k6/x/browser';

export default function () {
  const browser = launcher.launch('chromium', {
    headless: false,
  });
  const context = browser.newContext();
  const page = context.newPage();
  const res = page.goto('http://localhost:8080/other');
  const l = page.locator('#cars-options');
  sleep(1);
  l.tap({
    position: {
      x: 0,
      y: 40
    }
  });

  sleep(10);
  browser.close();
}

In the test above, it should select the third option in the select menu, but it always selects the first option.

@ankur22 ankur22 added the bug Something isn't working label Jul 27, 2022
@inancgumus inancgumus changed the title Using position option on locator methods that has it doesn't offset the position as requested tap position option doesn't offset the position as requested Sep 14, 2022
@inancgumus inancgumus added hacktoberfest Suitable for Hacktoberfest 🎉 good first issue Good for newcomers labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Suitable for Hacktoberfest 🎉
Projects
None yet
Development

No branches or pull requests

2 participants