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

Export to webdriver.io does not produce valid JS #76

Open
apokryfos opened this issue Nov 3, 2020 · 0 comments
Open

Export to webdriver.io does not produce valid JS #76

apokryfos opened this issue Nov 3, 2020 · 0 comments

Comments

@apokryfos
Copy link

apokryfos commented Nov 3, 2020

The JS produced in certain webdriver.io tests seems to not be valid JS syntax.

Minimum test to reproduce (in the sample export format)

sendKeys | css=button[name="search"][value="abc"] | abc

This produces webdriver.io test case:

var assert = require('assert');

describe('TestName', function() {

	it('should do something', function() {
		await $('button[name='search'][value='abc']').sendKeys(undefined);
	});

});

These has issues:

  • await is used but the function is not async
  • the inner strings are single quoted which conflicts with the outer single quoted string
  • it does not seem to be sending the correct keys at all
  • sendKeys does not seem to be part of the webdriver.io API, I think the correct way to do this is via setValue

These are simple enough to fix but it can get tedious especially for large tests

Using Katalon Recorder 5.3.1 (which I don't actually see in the releases list but is what I got when I installed the chrome extension)

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