Using: selenium webdriver, rubygems, appium, android and ios devices
The app I am testing has a button which becomes enabled only when connected to a specific wireless network. I'd like to create a script which will check if the button is active or not
vKioskStatus = element.enabled?
puts(vKioskStatus)
If it is not active, then I'd like to change wifi networks. Is that possible to automate changing networks on a mobile device?
UPDATE
I'm receiving the following error when trying to use getNetworkConnection. Is there a require I need to add?
<main>': undefined method `getNetworkConnection' for #<Selenium::WebDriver::Driver:0x..fe1a5511e browser=:firefox> (NoMethodError)
Here's my code:
require 'rubygems'
require 'selenium-webdriver'
require 'uri'
require 'appium_lib'
require_relative 'AndroidLib'
cButton = Buttons.new
driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4723/wd/hub") # Works for Android
sleep(5)
bob = driver.getNetworkConnection()
puts bob