gemini
gemini copied to clipboard
Flick action doesn't work with selenium server
Output of gemini --version: 4.13.0
Contents of .gemini.yml file:
rootUrl: http://localhost/cartis/
sessionRequestTimeout: 60000
screenshotsDir: './screens'
browsers:
chrome-ios:
rootUrl: http://localhost/mobile/ios
screenshotsDir: './screens/ios'
desiredCapabilities:
browserName: 'chrome'
chromeOptions:
mobileEmulation:
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4'
deviceMetrics:
width: 375
height: 667
pixelRatio: 1
system:
plugins:
json-reporter:
reportFile: ./gemini/report.json
Test source code:
gemini.suite('Testing', (suite) => {
suite.setUrl('/')
.capture('delete with swipe', (actions, find) => {
el = find('.swipeout:first-child');
actions.flick({ x: 1000, y: 1000 }, 2, el);
})
});
Command used to run the test:
gemini test --reporter html --reporter vflat
Result:
[flick({"ELEMENT":"11"},1000,1000,2)] Error response status: 13, UnknownError - An unknown server-side error occurred while processi
ng the command. Selenium error: java.util.HashMap cannot be cast to java.lang.String
Expected behaviour: Swipe occurs instead of the error.
Yep! It is a bug :(
Unfortunately, I can not promise that it will be fixed really soon, so pull requests are welcome :)
Am I right this bug is in gemini-selenium layer? Or where is the problem in which component?
It is a problem in gemini.
Flick works in wd (http client to selenium which gemini uses), it is a bug in gemini –> https://github.com/gemini-testing/gemini/blob/master/lib/tests-api/actions-builder.js#L294-L309
https://github.com/gemini-testing/gemini/blob/master/lib/tests-api/actions-builder.js#L301
I tried to change this code
return browser.flick(elem, offsets.x, offsets.y, speed); to
return browser.flick(elem.value, offsets.x, offsets.y, speed);
These changes work in chromedriver, but do not work in selenium. I do not understand what's the matter.
sorry, but what do you mean by "selenium"? what browser and environment?