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

So many methods not working with a React Locator. #4223

Open
laxmikant-parate opened this issue Feb 29, 2024 · 1 comment
Open

So many methods not working with a React Locator. #4223

laxmikant-parate opened this issue Feb 29, 2024 · 1 comment
Labels

Comments

@laxmikant-parate
Copy link

What are you trying to achieve?

Seems like react locators only work fine with I.click and I.seeElement. I get different errors when using other methods like waitForVisible, waitForElement, moveCursorTo, focus, scrollTo whenever I pass a react locator.

How to reproduce

There is this file called react_test.js in codecept's repo at location examples\react_test.js. Just change the content and use any of above methods.

Example change the code to below code

Feature('React Apps');

Data([{ a: 1, toString: () => 'a' }, { b: 2, toString: () => 'b' }]).Scenario('try react app', ({ I }) => {
  I.amOnPage('https://codecept.io/test-react-calculator/');
  I.click('7');
  I.waitForVisible({ react: 't', props: { name: '5' } });
  I.seeElement({ react: 't', props: { name: '5' } });
  I.click('button', { react: 't', props: { name: '2' } });
  I.click('button', { react: 't', props: { name: '+' } });
  I.click('button', { react: 't', props: { name: '9' } });
  I.click('button', { react: 't', props: { name: '=' } });
  I.seeElement({ react: 't', props: { value: '81' } });
});

Getting this error with above code

image

Different methods throw different errors.

Details

  • CodeceptJS version: 3.5.14
  • NodeJS Version: v18.13.0
  • Operating System: Windows
  • playwright
Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant