Comments (3)
I was incorrectly setting up the Capybara driver for Appium. sorry!
from appium_capybara.
Hi Adids,
I am trying to automate mobile app using Capybara, Appium and Cucumber. Driver is able to find elements in step definitions but not in page classes. Please help me in suggesting some solutions
Capybara.rb
require 'capybara/cucumber'
require 'selenium-webdriver'
require 'appium_capybara'
desired_caps = {
platformName: 'android',
versionNumber: '6.0.1',
deviceName: 'Nexus',
appPackage: 'com.aconex.aconexmobileandroid',
appActivity: 'view.SplashActivity',
app: absolute_app_path
}
Capybara.configure do |config|
config.default_max_wait_time = 180
config.default_driver = :appium
Capybara.register_driver(:appium) do |app|
appium_lib_options = { server_url: "http://127.0.0.1:4723/wd/hub" }
all_options = {
appium_lib: appium_lib_options,
caps: desired_caps
}
Appium::Capybara::Driver.new app, all_options
end
end
env.rb
$LOAD_PATH.unshift(File.dirname(FILE) + '/../pages')
APP_PATH = '.apk File Path'
def absolute_app_path
File.join(File.dirname(FILE), APP_PATH)
end
from appium_capybara.
Driver is able to find elements in step definitions but not in page classes.
It works fine in the sample code. I suggest starting from there and then seeing what's different.
from appium_capybara.
Related Issues (20)
- appium_driver.start_driver times out HOT 1
- Appium Capybara not supporting native Capybara web methods HOT 2
- I see "Failure/Error: if e = error()" error while running my TC for android using Ruby + Capybara + Appium + Rspec HOT 8
- update capybara to be able to use webdriver 3+ HOT 1
- Not able to call rotate method HOT 2
- Gesture cannot be processed correctly HOT 3
- Update run time dependency for latest version of capybara HOT 5
- wrong number of arguments (given 2, expected 1) using Capybara 3.x HOT 1
- scroll_up/scroll_down should call touchactions/w3c actions instead of mobile command to make it work for both Android and iOS HOT 12
- Issue with Capybara 3.19+?
- Getting 'NoMethodError: undefined method `to_sym' for nil:NilClass' error when using Capybara+SitePrism+Appium+Rspec HOT 11
- Incompatibility with Capybara 3.27 HOT 4
- Cant use hide_keyboard on Android native app HOT 5
- Documentation: Is there any? HOT 3
- Is there a way to add parallel execution on emulators/simulators? HOT 2
- Selenium::WebDriver::Error::InvalidElementStateError: Cannot set the element to 'abc'. Did you interact with the correct element? HOT 6
- W3C actions sends wrong action id HOT 28
- wrong number of arguments (given 1, expected 0), when connect to sauce session HOT 1
- update note HOT 1
- check tag_name in Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appium_capybara.