mobile-spec's People
Forkers
pascalevertz dominikdary imurchie goodofficedevsenam magic-coder davidli2017 matthew8911 rafe-g zzg6 cjayswal yoyo4cash vrunoa shanojtr84 setoelkahfi andlab sumanthmattapali aravindanath witium dalavancloud khuangyl tomixu mohanprabhus ckzgraphics vriesmarcel nguyenlecorp vivektripathi-cpi isabella232 racoltacalin mdvgitmobile-spec's Issues
Return contexts as objects with optional data
Can GET /session/:sessionid/contexts
command be extended to return dictionary of contexts with optional data if present, instead of simple returning list of contexts names?
According to https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
GET /session/:sessionid/contexts
returns an array of strings representing available contexts, e.g. 'WEBVIEW', or 'NATIVE'
response data:
["NATIVE", "WEBVIEW_1", "WEBVIEW_2"]
We propose to extend this endpoint so that it would be able to return optional extra data if available:
GET /session/:sessionid/contexts
returns a dictionary where keys are strings representing available contexts, e.g. 'WEBVIEW', or 'NATIVE' and values are objects representing optional data for each context if avaible
response data:
{
"NATIVE": null,
"WEBVIEW_1": {
"title": "page title",
"url": "https://github.com/SeleniumHQ/mobile-spec/"
},
"WEBVIEW_2": {
"title": "other page title",
"url": "https://example.com/"
}
}
Alternately a list of object may be used, instead of dictionary.
Where it can be used?
See appium/appium#4911
This will be useful for hybrid-apps that have more than one webview, as it will make it easier to decide which context should be used by inspecting optional data after calling only one endpoint (instead of iterating over contexts and switching to them to read data).
For example, in our app we have UI where user actions can add new webview to navigation stack. In our tests we have to determine to which webview we should switch (and web context number is not constant, as it depends on previous user actions). As result, we have to iterate over contexts and ask for some attribute (e.g. title or url) to determine which context corresponds to which type of page object. Currently Appium already gets extra information from web contexts on iOS, but this data is not passed along to client. Returning this data to client will reduce number of requests needed in some use-cases, reducing test logic complexity, and slightly reducing test execution time and improving reliability.
make deviceName is optional for a scalable test infrastructure for mobile
Hi,
Based on my feature request in appium/appium#10943, Appium Server can be connected to Selenium Hub, but we still need to specify deviceName in Capabilities (it is mandatory) to be able to execute Appium test so I do not see a huge benefit for using Selenium Hub. Is there any plan to change in mobile-spec to make deviceName optional?
mobile-spec/spec-draft.md need to be updated
Blog address for the contact can not access, the case is arise
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.