logo
down
shadow

'reference to setCapability is ambiguous' on Appium Java project for Android Caps


'reference to setCapability is ambiguous' on Appium Java project for Android Caps

By : sweety
Date : November 22 2020, 04:01 AM
Any of those help I am working on Appium-Java maven driven framework and getting below error for Android Capabilities , Typecasting Output from JsonPath.read , to String resolved the issue.
code :
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", (String) JsonPath.read(jsonFile, "$." + "platformName"));


Share : facebook icon twitter icon
Ambiguous reference to ViewModel in MVC project

Ambiguous reference to ViewModel in MVC project


By : Algorithm
Date : March 29 2020, 07:55 AM
I hope this helps you . You could try:
Cleaning the solution and rebuilding Ensure the version of the .Net framework your projects are pointing at are the same Clear your Bin & Obj folders
How to reference a java project in my android project?

How to reference a java project in my android project?


By : user2333288
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Add your Java project to your build path:
Right click on your Android project, click on Properties. In the dialog, select Java Build Path, and then click on the Projects tab. There, add your Java project to the build path.
How do we reference custom Android and Java Libraries living outside the directory of our Main Android Project?

How do we reference custom Android and Java Libraries living outside the directory of our Main Android Project?


By : Roger Hui
Date : March 29 2020, 07:55 AM
Any of those help Table of Contents Naming and Directory Conventions Basic tricks Create Main Android Project Create Custom Android Library Reference Custom Android Library from Main Android Project Create Java Library/Module Reference Java Library from Main Project Please edit Naming and Directory Conventions
Firstly we establish our naming and directory conventions (if you don't like the following, establish your own convention).
code :
..\LibraryRefDemo\MyMainProject
..\LibraryRefDemo\Libraries\MyAndroidLibrary
..\LibraryRefDemo\Libraries\MyJavaLibrary
// (package name for MyMainProject's root module: "app")
au.com.example.mymainproject

// (package name for MyAndroidLibrary's root module: "malmodule")
au.com.example.malmodule

// (package name for MyJavaLibrary' module where we placed our 
// java code to be shared: "mjlmodule")
au.com.example.mjlmodule 
app (MyMainProject's root module)
malmodule (MyAndroidLibrary's root module)
mjlmodule (The MyJavaLibrary's module where we placed our java code to be
  shared. The MyJavaModule will also contain a root "app" module 
  for reasons of gradle integration)
include ':app'

include ':malmodule'
// Despite the name "project" we actually need to reference the module directory
// of a project. It doesn't matter whether there is a trailing slash '/' or not.
project(':malmodule').projectDir =
        new File(settingsDir, '../Libraries/MyAndroidLibrary/malmodule/')

include ':mjlmodule'
// Despite the name "project" we actually need to reference the module directory
// of a project. It doesn't matter whether there is a trailing slash '/' or not.
project(':mjlmodule').projectDir =
        new File(settingsDir, '../Libraries/MyJavaLibrary/mjlmodule/')
dependencies {
    ...
    // Reference module rather than project.
    implementation project(':malmodule')
    implementation project(':mjlmodule')
    ...
}
<TextView
    android:id="@+id/mymainproject_output"
    android:layout_width="wrap_content"
<string name="mymainproject_cool_string">From My Main Project</string>
public class MainActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView textView = (TextView) findViewById(R.id.mymainproject_output);
        String someString = getResources().getString(R.string.mymainproject_cool_string) + "\r\n";
        textView.setText(someString); 
    }
} 
From My Main Project
<string name="myandroidlibrary_cool_string">From My Android Library</string>
<TextView
    android:id="@+id/myandroidlibrary_output"
    android:layout_width="wrap_content"
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView myText = (TextView) findViewById(R.id.myandroidlibrary_output);
        String someString = getResources().getString(R.string. myandroidlibrary_cool_string) + "\r\n";
        myText.setText(someString); 
    }
} 
From My Android Library
// Change ...
apply plugin: 'com.android.application'

// To ...
apply plugin: 'com.android.library'
...
android {
    compileSdkVersion 26
    defaultConfig {
//        applicationId "au.com.example.malmodule"
        ... 
include ':app'

include ':malmodule'
// Despite the name "project" we actually need to reference the module directory
// of a project. It doesn't matter whether there is a trailing slash '/' or not.
project(':malmodule').projectDir =
        new File(settingsDir, '../Libraries/MyAndroidLibrary/malmodule/')
dependencies {
    ...
    // Reference module rather than project.
    implementation project(':malmodule')
    ...
}
<string name="myandroidlibrary_cool_string">From My Android Library</string>
<TextView
    android:id="@+id/mymainproject_output"
    android:layout_width="wrap_content"
...
public class MainActivity extends Actvity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView myText = (TextView) findViewById(R.id.mymainproject_output);
        String someString = getResources().getString(R.string.mymainproject_cool_string) + "\r\n";
        someString += getResources().getString(au.com.example.malmodule.R.string.myandroidlibrary_cool_string) + "\r\n";
        myText.setText(someString); 

    }
}
<activity android:name=".MainActivity">
    <!-- Don't make a main/launcher activity when being called by main app -->
    <!--<intent-filter>-->
        <!--<action android:name="android.intent.action.MAIN" />-->

        <!--<category android:name="android.intent.category.LAUNCHER" />-->
    <!--</intent-filter>-->
</activity>
From My Main Project
From My Anroid Library
<string name="myandroidlibrary_cool_string">My Android Library XXX</string>
package au.com.example.mjlmodule;

public class Start {
    public static void main(String[] args) {
        System.out.println(getCoolString());
    }

    // Must be public because we want to reference the method directly later
    public static String getCoolString() {
        return "From My Java Library";
    }
} 
apply plugin: 'java-library'
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
}

// You can delete or comment out ...
//sourceCompatibility = "1.7"
//targetCompatibility = "1.7"
From My Java Library
public class Start {
    public static void main(String[] args) {
        System.out.println(getCoolString());
    }

    // Must be public because we want to reference the method directly later
    public static String getCoolString() {
        return "From My Java Library YYY";
    }
}
From My Java Library YYY
include ':app'

include ':malmodule'
// Despite the name "project" we actually need to reference the module directory
// of a project. It doesn't matter whether there is a trailing slash '/' or not.
project(':malmodule').projectDir =
        new File(settingsDir, '../Libraries/MyAndroidLibrary/malmodule/')

include ':mjlmodule'
// Despite the name "project" we actually need to reference the module directory
// of a project. It doesn't matter whether there is a trailing slash '/' or not.
project(':mjlmodule').projectDir =
        new File(settingsDir, '../Libraries/MyJavaLibrary/mjlmodule/') 
dependencies {
    implementation project(':malmodule')
    implementation project(':mjlmodule')
...
}
package au.com.example.mjlmodule;

public class Start {
    public static void main(String[] args) {
        System.out.println(getCoolString());
    }

    // Must be public because we want to reference the method directly later
    public static String getCoolString() {
        return "From MyJavaLibrary YYY";
    }
}  
<TextView
    android:id="@+id/mymainproject_output"
    android:layout_width="wrap_content"
...
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView textView = (TextView) findViewById(R.id.mymainproject_output);
        String someString = getResources().getString(R.string.mymainproject_cool_string) + "\r\n";
        someString += getResources().getString(au.com.example.malmodule.R.string.myandroidlibrary_cool_string) + "\r\n";
        someString += au.com.example.mjlmodule.Start.getCoolString() + "\r\n"; 
        myText.setText(someString);

    }
}
From MyMainProject
From My Android Library XXX
From My Java Library YYY
public static String getCoolString() {
    return "From My Java Library ZZZ";
} 
From MyMainProject
From My Android Library XXX
From My Java Library ZZZ
Being too stupid to implement Appium Java client into Android Studio Project

Being too stupid to implement Appium Java client into Android Studio Project


By : user1979594
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further If you want to automate with Appium Java client, it's best to keep it's test project separate from the Android project and use your built app APK in the Appium test.
If you want to keep your test together with the Android project, it's best to use Espresso as it's a part of the Android SDK.
Appium different caps for different test

Appium different caps for different test


By : user2153902
Date : March 29 2020, 07:55 AM
To fix the issue you can do I'm using Python Behave BDD tests. I have written multiple tests and only one test requires fullReset set to false, noReset set to true and different appWaitActivity than other tests. Is there some way to make in the device.py file for the test to recognize this test and then set those desired caps? Like with if scenario name is "that" then allow those caps, any advice is helpful. , I found one possible solution. You can put
code :
import sys 
if sys.argv[1] == name_needed_test:
Related Posts Related Posts :
  • OpenFlow Rule Metadata
  • Input Capture mapping using PPS
  • What does the "R + 'static" syntax mean in "F: FnOnce(&mut Resource<S>) -> R + 'static"
  • Google Cloud authorization keeps failing with Python 3 - Type is None, expected one of ('authorized_user', 'service_acco
  • Service Fabric Stateless api certification based authentication
  • How do I use ranges with Presto DB
  • Bootstrap4 - cards and grid together?
  • JFrame does not show anything
  • Database.getQueryLocator return wrong data
  • SonarQube/ SonarCloud - Is there an option in SonarQube Web Interface (UI) to display analysis per commit basis?
  • Azure Application Gateway exit IPs
  • Aqueduct controller subrouting
  • Location filter tweepy module
  • EntityFramework.SqlServer missing in release mode
  • RefreshDatabase is extremly slow
  • Does every record in a Flink EventTime application need a timestamp?
  • Convert first lowercase to uppercase and uppercase to lowercase (regex?)
  • Text analytics returns 404 'Resource not found'
  • ML version of anonymous map inside let?
  • C++ builder How to access a specific cell in a DrawGrid
  • Correct Data Protection Declaration
  • Express.js can't display images from directory 'images' with express.static
  • Drupal 8 getting empty $_GET variable
  • Cross-compiling boost 1.69.0 for ARM
  • xarray apply_ufunc to get the min and max for every variable
  • Descend JSON doc paths and update field names with jq
  • Specifying multiple/wild card reply urls in Azure AD B2C
  • How to prevent Query of Queries returning case sensitive results from CFC in Coldfusion
  • Days as a time series?
  • Deleting ALL existing users from a list of Distribution Lists via powershell , Exhcange 2010
  • Filtering data using constraints in Datastage Transformer
  • Newline in block name
  • What is the difference between &Trait and impl Trait when used as method arguments?
  • Extending Repeater (or other widget with nested XML tag attributes)
  • servicestack null ref error when using native SQL and ORMLite. Dapper error
  • How to check if file exists in Eiffel
  • How To Pick Out Activity inbetween phrases in DialogFlow
  • How to check if IOTA is receiving data from device
  • How to get a link to a gitlab comment (inside a merge reqeust) that I wrote?
  • Code: 0x80073CFB downloading my own app from Microsoft Store
  • Processing get higher max frameRate
  • Redefining operator precedence in a module for exported predicate
  • Building an OpenAPI response, including oneOf, and maybe allOf
  • Counting number of files in a directory with Nifi
  • Chartjs Overlap click function doesnt work
  • Download macOS Mojave in windows 10 virtualbox
  • Dynamics Web Resource opening a dynamic window
  • How do I launch Spyder-Notebook?
  • p4 integrate/merge between depots
  • cannot quote my message on slack app for windows with >>>
  • How to fix app go to background after reorder to front and back
  • How can I save multiple pages of the PDF version of an Acumatica report to a file programmatically?
  • How to update the Frame's schema after Map.apply operation?
  • ECMA6 classes not working on IE11 with Webpack and Babel
  • QGIS - cannot change CRS of shapefile
  • snmpd.conf clientaddr not working for sending trap /inform with given IP source address
  • Should a DICOM StudyInstanceUID be unique to the patient?
  • org.apache.flink.client.program.ProgramInvocationException: Could not retrieve the execution result
  • Does iText 7 PdfReader support partial reading?
  • Gensim doc2vec file stream training worse performance
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org