appium_capybara icon indicating copy to clipboard operation
appium_capybara copied to clipboard

I see "Failure/Error: if e = error()" error while running my TC for android using Ruby + Capybara + Appium + Rspec

Open kay4444 opened this issue 8 years ago • 8 comments

Environment: Appium version: 1.4.16.1 Desktop OS/version used to run Appium: Windows 7 Samsung Galaxy S6 - real device

Details I am trying to set up environment for mobile automation TC running. I use Ruby + Capybara + Appium + Rspec. But something went wrong. I see errors while run TC

Logs: https://gist.github.com/kay4444/50f4ece611acbd4bb0b4713e2b7f57ef My settings file: https://gist.github.com/kay4444/0e903c1368e14ffb055300661a6a4331 My TC file: https://gist.github.com/kay4444/1a8ef7f9fca011882cf8a0392521abbd My Gem file: https://gist.github.com/kay4444/34e1616eb9463c5d79d8b3ee74e7baa2

kay4444 avatar Dec 16 '16 16:12 kay4444

Is there any progress for this issue?

kay4444 avatar Dec 22 '16 16:12 kay4444

Please let me know if you need nay additional info.

kay4444 avatar Dec 22 '16 16:12 kay4444

I don't think this gen is maintained anymore.

bootstraponline avatar Dec 22 '16 17:12 bootstraponline

Capybara::Screenshot is not supported for now. See mattheworiordan/capybara-screenshot#142

mishaaq avatar Jan 17 '17 13:01 mishaaq

Was wondering if anyone is maintaining this Gem.would be nice if someone does.

NishNutmeg avatar Oct 01 '17 10:10 NishNutmeg

No one maintains this gem for now.(I've updated once to update ruby_lib.)

KazuCocoa avatar Oct 01 '17 11:10 KazuCocoa

BTW, browser_initialized? is deprecated in Capybara. So, mattheworiordan/capybara-screenshot#142 will break, I guess.


I think the error is disconnect session related one, and in this case, taking screenshots is failed. We should catch the exception or skip Capybara commands because of disconnection.


I add an example to taking screenshot as after hook, though. https://github.com/appium/appium_capybara/blob/master/example/spec/spec_helper.rb#L11

KazuCocoa avatar Oct 01 '17 13:10 KazuCocoa

Anyway, to avoid this error, we need to add error handling in mattheworiordan/capybara-screenshot like the PR or add ignoring the error, or raising the other error?, in save_screenshot in appium capybara side, I suppose. (But I don't like to add ignoring the general error in save_screenshot or the other method.)

KazuCocoa avatar Oct 01 '17 13:10 KazuCocoa