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

Error with sendKeys(Key.UP) #65

Open
troppoli opened this issue Jun 27, 2022 · 2 comments
Open

Error with sendKeys(Key.UP) #65

troppoli opened this issue Jun 27, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@troppoli
Copy link

Sending 1 files to free worker...
 ERR test\e2e\pages\series-actions.ts Transformation error (Error transforming test\e2e\pages\series-actions.ts:276)
Error transforming test\e2e\pages\series-actions.ts:276

>                 await protractor.browser.actions().sendKeys(Key.UP).perform()
                        ^

Expected "proctractor.Key.XXX" as argument to the sendKeys command. Please raise an issue in the codemod repository: https://github.com/webdriverio/codemod/issues/new
  at test\e2e\pages\series-actions.ts:276:22

The interesting bit seems to be

         it('should select the series and combine', async () =>{
            
            // select the series
            let thumbnails:ElementFinder[] = await thumbs.thumbnails();
            expect(thumbnails).not.toBeUndefined();
            //reset selection to first series
            for(let i = 0 ; i < seriesCount ; i++){
                await protractor.browser.actions().sendKeys(Key.UP).perform(); 
            } 
            // scroll down to series via arrow keys
            for( let s = 0 ; s < selectedSeries ; s++ ){
                await protractor.browser.actions().sendKeys(Key.DOWN).perform();
            }
            expect(thumbnails[selectedSeries].isSelected()).toBeTruthy();
        })
@christian-bromann christian-bromann added the help wanted Extra attention is needed label Jun 27, 2022
@christian-bromann
Copy link
Member

Any contributions that help transform that bit to browser.keys(...) would be much appreciated.

@noobzillla
Copy link

noobzillla commented Jan 25, 2023

Sending 1 files to free worker...
 ERR test\e2e\pages\series-actions.ts Transformation error (Error transforming test\e2e\pages\series-actions.ts:276)
Error transforming test\e2e\pages\series-actions.ts:276

>                 await protractor.browser.actions().sendKeys(Key.UP).perform()
                        ^

Expected "proctractor.Key.XXX" as argument to the sendKeys command. Please raise an issue in the codemod repository: https://github.com/webdriverio/codemod/issues/new
  at test\e2e\pages\series-actions.ts:276:22

The interesting bit seems to be

         it('should select the series and combine', async () =>{
            
            // select the series
            let thumbnails:ElementFinder[] = await thumbs.thumbnails();
            expect(thumbnails).not.toBeUndefined();
            //reset selection to first series
            for(let i = 0 ; i < seriesCount ; i++){
                await protractor.browser.actions().sendKeys(Key.UP).perform(); 
            } 
            // scroll down to series via arrow keys
            for( let s = 0 ; s < selectedSeries ; s++ ){
                await protractor.browser.actions().sendKeys(Key.DOWN).perform();
            }
            expect(thumbnails[selectedSeries].isSelected()).toBeTruthy();
        })

Hope this work around helps ( #45 (comment) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants