I try to start my application on my Android phone (with appium), and, in the same time, a chrome browser on my local computer (with selenium). My goal is to test communication between the chrome browser(on my computer) and my android application. Problem : when I try to switch context for appium webdriver, that’s doesn’t work : no context exists !
Hi @max,
You should create two drivers (an Appium driver and a Selenium driver) and then you could interact with them simultaneously. For example, to work with a local Appium server and a local Chrome, in python:
from appium.webdriver.webdriver import WebDriver as AppiumDriver
from selenium.webdriver.chrome.webdriver import WebDriver as ChromeDriver
appium_capabilities = {
'automationName': 'Appium',
'platformName': 'Android',
'deviceName': 'Android',
'app': 'APK_PATH'
}
appium_driver = AppiumDriver(command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities=appium_capabilities)
chrome_driver = ChromeDriver(executable_path='CHROMEDRIVER_PATH')
chrome_driver.get('http://www.google.com')
appium_driver.find_element(...)
chrome_driver.find_element(...)
appium_driver.quit()
chrome_driver.quit()
w.r.t to the same context, I have few questions.
My scenarios is that I need the Appium Android driver and Selenium Web driver to be interacted for data comparision purposes.
When the data is submitted from Mobile app (Android driver), the same data goes and sit in the Desktop Web browser application (Selenium Web driver).
I now want to compare these two data while opening the browser outside of the mobile as a standalone browser and ensure that the match is happening.
can someone please throw the inputs regarding this?
In above example, Chrome is opened as a standalone browser, not inside the mobile. You can use the same approach: open both drivers, submit data from Appium driver, get data from chrome_driver and check that they are equals.
How would you make sure both drivers(selenium webdriver and appiumdriver) are initiated on the same node if I were executing tests on grid? In my case I want to need to interact with selenium webdriver and then with Appium WinAppDriver in the same test. So I can perform file upload.
Can you share Java Code Snippet for having chromedriver been launched within app.
Currently trying to do a context switch after launching sdk to web view. Here to execute script, it is asking for chromedriver to be installed.
Not able to send chromedriver in desired capabilities stating both AppName and ChromeDriver is not allowed. Can some one help here. Few articles are there to set chromedriver at run time, but not sure how to set them at runtime. I am executing scripts via TestNG
I’m trying to do similar thing but with appium 2.0(server) and webdriverio(client) and selenium for chrome browser. I getting an error ‘TypeError: $ is not a function’
can someone please help ?