Selendoid - create session - selenium

I'm try using Selendroid(version 0.7.0) for testing mobile version website. Can't start session. How valid parameters for start session ?
php/http examples likes.
Selendroid status:
curl 'http://localhost:4444/wd/hub/status'
{
"status":0,
"value":{
"supportedApps":[
],
"os":{
"arch":"amd64",
"name":"Linux",
"version":"3.2.0-58-generic"
},
"build":{
"browserName":"selendroid",
"version":"0.7.0"
},
"supportedDevices":[
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
},
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
},
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
}
]
}
}
Create session:
curl -d '{"desiredCapabilities":{"browserName":"selendroid","emulator":{"androidTarget":"ANDROID18"}}}' http://localhost:4444/wd/hub/session
{
"status":33,
"sessionId":"",
"value":{
"message":"The requested application under test is not configured in selendroid server.",
"class":"io.selendroid.exceptions.SessionNotCreatedException",
"stacktrace":[
"io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:257)",
"io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)",
"io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:130)",
"io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:81)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)",
"org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:77)",
"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)",
"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)",
"java.lang.Thread.run(Thread.java:744)"
]
}
}

The capabilties are wrong in your curl command. Please use this one:
curl -d '{"desiredCapabilities":{"browserName":"android","emulator":True,"androidTarget":"ANDROID16"}}' http://localhost:4444/wd/hub/session
For testing the mobile web you have to use the browser name "android". The attribute "emulator" defines if an Android Emulator or a hardware device should be used. "androidTarget" is optional.

Related

Simple peer different network calling Issue

I am using simple peer for my video call web application. when I call people in the same network video call is working perfectly. But in the different networks, it is not working. I also added ICE servers(stun/turn) to simple peer. Still, the same issue is happening can anyone please help me out. I am getting this issue in the console
Error: Connection failed. at h (index.js:17)at f.value (index.js:654) at RTCPeerConnection.t._pc.onconnectionstatechange (index.js:119)
const peer = new Peer({
initiator: true,
trickle: false,
stream,
config: {
iceServers: [
{
urls: "stun:numb.viagenie.ca",
username: "************",
credential: "************"
},
{
urls: "turn:numb.viagenie.ca",
username: "************",
credential: "************"
}
]
}
});
I had facing through the same issue.
I'm not sure if that has to do with those specific iceServers but I replace them with this ones on it works
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun1.l.google.com:19302' },
{ urls: 'stun:stun2.l.google.com:19302' },
{ urls: 'stun:stun3.l.google.com:19302' },
{ urls: 'stun:stun4.l.google.com:19302' },
{
url: 'turn:turn.bistri.com:80',
credential: 'homeo',
username: 'homeo',
},
{
url: 'turn:turn.anyfirewall.com:443?transport=tcp',
credential: 'webrtc',
username: 'webrtc',
},
Everything is working good but now my problem is that safari is not working just chrome with iOS
If someone knows how to handle this compatibility please contact me! :D
my issue here was with the stun/turn server.we can check the status of servers using
https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
If you test a STUN server, it works if you can gather a candidate with type "srflx". If you test a TURN server, it works if you can gather a candidate with type "relay".
check you are getting this

Azure IotHub download edge device configuration

I am looking for an endpoint in Azure IotHub to download the full configuration of an edge device.
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {...
"runtime": {...
"schemaVersion": "1.0",
"systemModules": {
"edgeAgent": {...
"edgeHub": {...
}
},
"$edgeHub": {
"properties.desired": {...
}
}
}
There is an endpoint to apply the configuration, but I just cannot find a way to access the configuration with code :-)
Can someone point me to the right direction?
Thanks
One option to query the local configuration is:
az iot hub module-twin show -n <name-of-your-hub> -d <edge-device-name> -m '$edgeAgent'
If you want to query a current status you can add --query 'properties.reported.modules'
In addition when you have the module ids you can query the module twin as well using:
az iot hub module-twin show --hub-name <name-of-your-hub> --device-id <edge-device-name> --module-id <module-name>
Hopefully it answers your question

Invalid variant ID while creating checkout for Shopify

I am trying to create checkout url using Admin API with following params.
URL: https://shopy-test11.myshopify.com/admin/api/2020-10/checkouts.json
{
"checkout": {
"line_items": [
{
"variant_id": 37033347711169,"quantity": 2
}
]
}
}
Unfortunately its returning below error which is not properly documented anywhere that I could find.
{
"errors": {
"line_items": {
"0": {
"variant_id": [
{
"code": "invalid",
"message": "is invalid",
"options": {}
}
]
}
}
}
}
I also tried Shopify-api ruby gem and got same error. There are some similar issue online, but none answers why that issue is occurring and how to fix it. This is new app under development which will create custom checkout. There's only one sales channel which is "Online Store" and is enabled for all products. Any ideas how to fix this issue? Any help is appreciated.
You seem to be mixing up concepts here. The checkout API is only associated with the Storefront API, and has nothing to do with the Admin API.
So this URL: /admin/api/2020-10/checkouts.json seems to be impossible. There is no endpoint in the admin API for checkouts, whereas, Storefront API which does have checkouts, might be your proper URL. So try that:
/api/2020-10/checkouts.json
And if you have the correct token in your header, it will likely work.

WSO2 EMM 2.1.1 : Device not present in the dashboard analytics

I am currently installing with WSO2 EMM
I managed to set it correctly for my domain name.
I managed to put several tablets and smartphones under Android in the management console EMM.
https://i.stack.imgur.com/0Wlq0.png
In the emm-analytics-dashboard console, I do not see any devices
https://i.stack.imgur.com/MZiU4.png
I'm use the WSO2 2.1.1 version
Can you help me please.
Sorry for my english because i'm french... I use Google Translator
Thank for your reply.
You need to setup authorization configuration in portal/configs/designer.json
"authorization": {
"activeMethod": "oauth",
"methods": {
"oauth": {
"attributes": {
"idPServer": "https://localhost:9443/oauth2/token", (or https://<your_ip>:9443/oauth2/token)
"dynamicClientProperties": {
"callbackUrl": "https://localhost:9443/portal", (or https://<your_ip>:9443/portal)
"clientName": "portal",
"owner": "admin",
"applicationType": "JaggeryApp",
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer",
"saasApp": false,
"dynamicClientRegistrationEndPoint": "https://localhost:9443/dynamic-client-web/register/", (or https://<your_ip>:9443/dynamic-client-web/register/)
"tokenScope": "Production"
}
}
}
}
}
Surely, This will help you.

SoftLayer_Account::getOperatingSystemReloadImages

I want to use API to get the available OS list during OSReload.
I found the method SoftLayer_Account::getOperatingSystemReloadImages is mentioned.But cannot find the usage about this method.
Who can help me on this?
Thanks.
I was not able to find this method getOperatingSystemReloadImages. But I found a way to get OS reload options:
First, we need to know the package used to order the server. For example for Virtual Guests, the package used is 46. But if you want to confirm this, please execute the following Rest request:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[package]
Method: GET
Then, to get ”Reload options”, execute:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices?objectFilter={ "itemPrices": { "categories": { "categoryCode": { "operation": "os" } } } }&objectMask=mask[id,item[softwareDescription], categories[categoryCode]]
Method: GET
References:
SoftLayer_Virtual_Guest::getBillingItem
SoftLayer_Product_Package::getItemPrices
EDIT:
Now, in order to use ” SoftLayer_Virtual_Guest::reloadOperatingSystem”, we need add some parameters in Json body configuration: “token” and “config” (Ref: SoftLayer_Virtual_Guest::reloadOperatingSystem)
Below is a REST example:
URL:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[virtual_Guest_ID]/reloadOperatingSystem
Method: POST
Json:
{
"parameters": [
"FORCE",
{
"itemPrices": [
{
"id": 45466
}
]
}
]
}
Where: 45466 is the new priceId of the OS
See this example to reload OS https://gist.github.com/softlayer/407058