appium-java Unknown HttpClient factory apache when initializing driver - appium

I'm trying to migrate from appium-java client 7.0 to 8.3 - After updating to 8.3 version I get an error when initializing appium driver (for iOS)
java.lang.IllegalArgumentException: Unknown HttpClient factory apache
at org.openqa.selenium.remote.http.HttpClient$Factory.create(HttpClient.java:57)
at org.openqa.selenium.remote.http.HttpClient$Factory.createDefault(HttpClient.java:73)
at io.appium.java_client.remote.AppiumCommandExecutor.<init>(AppiumCommandExecutor.java:108)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:92)
at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:106)
Command to start appium server is build smth like this
command = nodePath + " " + appiumMainJS + " ";
command = command + " -a " + hostName + " -p " + availablePort + " ";
command = command + " -cp " + (availablePort + 1000) + " -bp " + (availablePort + 2000);
command = command + " --chromedriver-port " + (availablePort + 3000);
command = command + " " + appiumArgs;
Capabilities
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, OS_VERIOSN);
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
capabilities.setCapability("appium:keychainPath", KEYCHAIN_PATH);
capabilities.setCapability("appium:keychainPassword", KEYCHAIN_PASSWORD);
capabilities.setCapability("appium:xcodeOrgId", XCODE_ORG_ID);
capabilities.setCapability("appium:xcodeSigningId", XCODE_SIGNING_ID);
capabilities.setCapability("appium:deviceName", DEVICE_NAME);
capabilities.setCapability("appium:showXcodeLog", true);
capabilities.setCapability("appium:noReset", false);
capabilities.setCapability("appium:simpleIsVisibleCheck", false);
capabilities.setCapability(MobileCapabilityType.UDID, DEVICE_ID);
capabilities.setCapability("appium:newCommandTimeout", "2000000");
capabilities.setCapability("appium:launchTimeout", "120000");
capabilities.setCapability("appium:shouldUseSingletonTestManager", false);
capabilities.setCapability("appium:wdaConnectionTimeout", 15*60*1000);
capabilities.setCapability("appium:sendKeyStrategy", "setValue");
capabilities.setCapability("appium:session-override", true);
capabilities.setCapability("appium:webkitResponseTimeout", 20000);
capabilities.setCapability("appium:useJSONSource", true);
capabilities.setCapability("appium:sendKeyStrategy", "grouped");
capabilities.setCapability("appium:commandTimeouts", "1000000");
capabilities.setCapability("appium:webDriverAgentUrl", customWdaUrl);
capabilities.setCapability("appium:webDriverAgentUrl", WDA_SERVER_URL);
capabilities.setCapability(IOSMobileCapabilityType.WDA_LOCAL_PORT, wdaPort);
Driver is initialized like this
IOSDriver iosDriver = new IOSDriver(url, capabilities);
What could be the issue here?

Related

file not found,jenkins pipline

I am getting file not found error on my Jenkins job.
if (component_meta ==null)
echo "path = " + component_meta
else if (component_meta.tf_version !=null){
echo "path = " + component_meta
echo "version = " + component_meta.tf_version
dir ("base/" + component_meta.path){
sh 'rm -rf .terra*'
sh "terragrunt plan --terragrunt-tfpath /usr/local/bin/tf/versions/" + component_meta.tf_version + "/terraform" + " -detailed-exitcode"
}
}
error I beleive is in the system of below command
sh "terragrunt plan --terragrunt-tfpath /usr/local/bin/tf/versions/" + component_meta.tf_version + "/terraform" + " -detailed-exitcode"

py2neo.packages.httpstream.http.SocketError: Connection refused

When I try to run the python file “joern-plot-ast” and output some result in the database Neo4j, I got the error "py2neo.packages.httpstream.http.SocketError: Connection refused".
use neo4j version: 2.1.8.
python version:2.7.
py2neo:2.0
String cmd1 = "echo \'queryNodeIndex(\"type:Function\").id\' | " +
"python /home/sun/下载/joern-tools/build/scripts-2.7/joern-lookup -g | " +
"python /home/sun/下载/joern-tools/build/scripts-2.7/joern-plot-ast | " +
"python /home/sun/下载/joern-tools/build/scripts-2.7/joern-astlabel | " +
"python /home/sun/下载/joern-tools/build/scripts-2.7/joern-ast2features >" + outputfilename;
Process joernscripts = dbTime.exec((new String[]{"/bin/sh","-c", cmd1}));
joernscripts.waitFor(); BufferedReader br5 = new BufferedReader(new InputStreamReader(joernscripts.getInputStream()));
while(br5.ready())
System.out.println(br5.readLine());
Actual results: see the pic.

Code working in Powershell ISE 2.0 but not ISE 4.0

The following code open a random number generator, selects the button to run the generator, and returns a random number.
#Start-Process
$ie = New-Object -com InternetExplorer.Application
$ie.Navigate("https://www.random.org/widgets/integers/iframe.php?title=True+Random+Number+Generator&buttontxt=Generate&width=160&height=200&border=on&bgcolor=%23FFFFFF&txtcolor=%23777777&altbgcolor=%23CCCCFF&alttxtcolor=%23000000&defaultmin=1&defaultmax=100&fixed=off")
$ie.visible = $true
echo "Random.org opening"
while( $ie.busy){Start-Sleep 1}
sleep 10
echo "Random.org open"
$FindBtn = $ie.Document.getElementByID("true-random-integer-generator-button").click()
sleep 5
$result = $ie.Document.getElementByID("true-random-integer-generator-result").innerHTML
echo $result
This works fine for me in powershell 2.0, however, when I run in 4.0, iget the following errors:
You cannot call a method on a null-valued expression.
At line:13 char:1
+ $FindBtn = $ie.Document.getElementByID("true-random-integer-generator-button").c
...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At line:15 char:1
+ $result = $ie.Document.getElementByID("true-random-integer-generator-result").in
...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
What is the reason behind this? Is there a big formatting difference between powershell 4.0 and 2.0? 4.0 is on a different VM to 2.0, could that be having an affect?

Google Analytics & Blackberry UserAgent

I'm using this code to get the blackberry info on google analytics
private static String getUserAgent()
{
String userAgent = "Blackberry" + DeviceInfo.getDeviceName() + "/" +
getOsVersion() + " Profile/" + System.getProperty(
"microedition.profiles" ) + " Configuration/" + System.getProperty(
"microedition.configuration" ) + " VendorID/" +
Branding.getVendorId();
return userAgent;
}
And then using it here :
conn.setRequestProperty("User-Agent", userAgent);
The problem is that it doesn't recognize the terminal like a mobile phone , but it takes difference in browser .
Browser:
Navegador Visitas % Visitas
1. Blackberry8900 36 100,00%
Any idea if google analytics have some params to know that is a mobile phone ? or if i'm using a badformated useraggent.
Thanks for your answers.

painting a Long Text at LABELFIELD?

I have a long text for LabelField. But LabelField doesn't show all. I dont know how to fix it, what should I do?
I am using default labelfield.
manager
.add(new LabelField(
"IP kameranıza hemen bağlanmak için\n Ana Menüdeki \"Kameralarım\""
+ "butonuna tıklayınız. Açılan sayfadaki menüden \n\"Yeni Ekle\"yi seçip "
+ "kameranızın modelini, IP numarasını, port numarasını varsa kullanıcı adı ve şifresini "
+ "girip kayediniz. Eğer video server kullanıyorsanız \"Server Numarası\" "
+ "alanına izlemek istediğiniz kameranın numarasını(1,2,3 vb.) giriniz. "
+ "Normal bir IP kamera kullanıyorsanız \"Server Numarası\" alanını boş bırakınız. "
+ "Kamera listesinden istediğiniz kamerayı seçip menüden \"Izle\" seçeneğini "
+ "seçerek kameranızı izlemeye başlayabilirsiniz.Tam Ekran izlemek için "
+ "telefonunuzu yatay konumda tutunuz. Kameranızın PTZ özelliği varsa "
+ "ekranda görünen butonları kullanabilirsiniz.",
DrawStyle.HCENTER | USE_ALL_HEIGHT)
You want to use a TextField instead of a LabelField

Resources