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

Code generated doesn't wait for the ajax call to finish #10

Open
vishalgwalani opened this issue Nov 5, 2019 · 0 comments
Open

Code generated doesn't wait for the ajax call to finish #10

vishalgwalani opened this issue Nov 5, 2019 · 0 comments
Labels
bug Something isn't working hacktoberfest hacktoberfest2020 help wanted Extra attention is needed

Comments

@vishalgwalani
Copy link

vishalgwalani commented Nov 5, 2019

I have two pages in my application signin and password. When user enters email and clicks on NEXT button the API call is made. If the user exists then I am navigating to next page i.e password page. I integrated the code generated by extension in my app, but when an ajax call is made code doesn't wait for the ajax call to finish and looks for the element of next page i.e password page but as the ajax call is yet to finish it throws an error. I have attached the screenshot of error below.

code generated by the extension
describe('Test 1', () => { beforeAll(async () => { await page.goto('http://localhost:8000/sign-in'); }); it('Test 1 - 1', async () => { await page.click('#input_0'); await page.type('#input_0', 'okon.darrelo'); await page.keyboard.down('Shift'); await page.keyboard.press('_'); await page.keyboard.up('Shift'); await page.type('#input_0', 'd160i'); await page.keyboard.down('Shift'); await page.keyboard.press('@'); await page.keyboard.up('Shift'); await page.type('#input_0', 'anom.xyz'); await page.click('.form-signin > :nth-child(6)'); await page.click('.NEXT'); await page.click('#input_2'); await page.keyboard.press('CapsLock'); await page.type('#input_2', 'Newpassword1'); await page.click(':nth-child(4) > .NEXT'); }, 60000); });
error on console
image

.NEXT button is the element of page 1 and after that ajax call is made. #input_2 is the element of page 2

@omergulen omergulen added bug Something isn't working hacktoberfest hacktoberfest2020 help wanted Extra attention is needed labels Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest hacktoberfest2020 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants