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

can't find UI element using hasElementByAccessibilityId #6

Open
LayMuiToh opened this issue Oct 24, 2018 · 0 comments
Open

can't find UI element using hasElementByAccessibilityId #6

LayMuiToh opened this issue Oct 24, 2018 · 0 comments

Comments

@LayMuiToh
Copy link

import wd from 'wd';
import config from '../e2e-config';

const port = 4723;
const driver = wd.promiseChainRemote('localhost', port);
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

describe('Login Test', () => {
// beforeAll(async () => await driver.init(config));
// afterAll(async () => await driver.quit());
beforeAll(async () => {
await driver.init(config);

 });

it('find the user login fields', async() => {
expect(await driver.hasElementByAccessibilityId('textUserName')).toBe(true);
});

I got this when I run
npm run test:e2e:ios

however this UI element is visible and I have attached a accessibilityLabel to it.
what could have caused this failure?

jest --testMatch="/tests//*e2e.js"

FAIL tests/login.e2e.js (10.889s)
Login Test
✕ find the user login fields (902ms)

● Login Test › find the user login fields

expect(received).toBe(expected) // Object.is equality

Expected: true
Received: false

  18 |  
  19 |    it('find the user login fields', async() => {
> 20 |      expect(await driver.hasElementByAccessibilityId('textUserName')).toBe(true);
     |                                                                      
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

No branches or pull requests

1 participant