0

I wanted to automate my project, which has three parts:

  1. Web testing
  2. Ipad app
  3. Ios App

I have started with the web testing, by following all the steps on appium.io and installed Appium Server, Appium-python-client, and pycharm professional.

I have created my first test but I was not able to run it. I tried importing

from appium.webdriver.common.desired_capabilitites

but it throws the error:

Cannot find reference 'desired_capabilities' in '__init__.py'

this is the base case i have

import unittest
from typing import Dict

from appium import webdriver
from appium.options.common import AppiumOptions

desired_caps = {
    'platformName': 'Mac',
    'browserName': 'Chrome',
    'appium:automationName': 'XCUITest'
}

options = AppiumOptions()
# options.load_capabilities(desired_caps)

url = 'http://localhost:4723/wd/hub'
driver = webdriver.Remote(url, desired_caps)
driver.get("hhtps://www.google.com")

element = element.send_keys('admin')


driver.quit()

The code driver = webdriver.Remote(url, desired_caps) is asking for a [str,bool] value. How can I use desired_capabilities here?

1
  • Why do you need PyCharm Professional instead of free Community edition?
    – dzieciou
    Commented Nov 8, 2023 at 19:18

1 Answer 1

0

Using automation strategy, If you are going to run tests in macOS or Windows in any browser, you can reuse your tests in pure selenium.

The web is already maintained in Selenium project. It’s the testing framework’s responsibility to combine those tools and others in one place

No Appium is required for the same and even Appium provides the dependencies to run the tests in mobile devices browsers also.

If you are using POM file while adding below Appium dependency to your POM while will make you to run your tests on iOS mobile devices browsers.

<appium.java.version>8.0.0</appium.java.version> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.