The requirement is that, we have to fetch an entire receipt data using Appium, The list items does not have any unique identifier to differentiate between the receipt data and we have duplicate items in that list, so how can we fetch the entire list from the DOM altogether. As for now in DOM, we can only fetch the data, that is visible on the screen, so is it possible to fetch the entire list, either by scaling or anything else possible in Appium
Related
I am working on Android application automation, in that I am facing issue with the recycler view data handling.
All data are appearing into Recycler view in List Format.
I have stored all items in List but at a time I am able to get only presented items on UI.
I need all items into List??
Add initial data into your List, then perform some action to show another data (scroll, refresh or whatever, it based on application logic) and append these data to your list. Keep doing it until you collect all data. What is the actual issue you faced with?
In my app, i get the menu of the app through a web service. It around 423 number of records which changes rarely. What I need is to cache this record in the app after first time login and use the cached data. If there is any changes in the menu database then only it should refresh the menu content from web service again.
I am not very sure how i can achieve this. Currently I store all the records in an array of menu class and use directly, which is very time consuming as we are hitting the service call again and again for similar record. I am new to iOS development so any suggestions are most welcome.
Thanks!
Store the data in one of NSUserDefaults (if this is infrequent, but permanent config data), or NSCache (for ephemeral data), or CoreData (for permanent, performance-dependent data).
Load this cached data on app launch; if the cached data doesn't exist, retrieve it from your web service/API.
If you're not concerned with the data being up to date immediately after you change the menu content, use something like the Cache-Control header to set an invalidation time period (details). If you do want to ensure that the menu updates as soon as a new remote version is available, then you'll need to set up a versioning system where your app makes an API call to check the version of the menu and update if required.
Example scenario:
App launch
Load menu content from NSUserDefaults/CoreData/NSCache
Asynchronously check API for menu version
If new version of menu exists, asynchronously download and refresh the menu view
Save updated version of menu back to NSUserDefaults/CoreData/NSCache.
I'm trying to integrate the Parse local datastore into my app as a local cache.
I want to display a list of items that will remain the same for most of the time but could be added to or removed from occasionally.
These changes are managed on the Parse.com website (for now).
What I would like to be able to do is to display the locally pinned objects and at the same time fetch any changes from online and then update the displayed items to reflect that.
From what I have read the local query and the online query are mutually exclusive.
So I think the only way to do this is to do something like...
Create a local datastore query to get all the items and display them.
Start a query the connects to Parse.com and downloads the (potentially) updated items and pin any changes.
Run another local datastore query to get an updated list of items and reload the tableview (or whatever) is displaying them.
Am I correct in my assumption? Or is there a better way to do this?
I'm trying to create a planning app with Swift 2, which pulls the data from a remote server via an API. The data of the API is ordered by time. The app shows the data in the exact same order as the API returns.
Now, however, I have created a UITableView which can be pulled to refresh the data. I also have added the possibility to rearrange the data to the likings of the user. When the user refreshes the table however, the data will all be restored to the order of the returned API data.
My question is: how can I still refresh the data, but let the data keep the current position in the table?
You control the order in which data is displayed by how you implement cellForRowAtIndexPath. The API doesn't control your UI.
If you choose to display the data in the order returned by the API, then yes, user will lose their custom arrangement when the table is reloaded.
If you want the user to control the order data is displayed, you will need to persist some information about the order so that you can keep that order when the table is reloaded.
In the simplest case, you could provide some default sort options that make sense for the kind of data you have. You might have a type or category value that makes sense to sort on. You would then only need to persist the sort options the user has chosen and sort your data when reloading the table.
If you want the user to have complete control over the order, then you need to persist that order and reapply it when the table is reloaded. This is considerably more challenging. Some options, from easiest to hardest:
1. You could persist the order locally using just an identifier that uniquely identifies each item.
2. You could persist all the data and the order locally.
3. You could persist the order on the server.
I've got a list that fetches ~5,000 objects from a database and I'm trying to make it so that when you hover a row in the list, it fetches an image belonging to the item described.
Currently it fetches all 5,000 objects at once but I'd rather have them take a second to load than pre-loading them. I'm wondering if there's any way to stop the images from pre-loading?
Currently I'm only using PHP/CSS/HTML, I don't mind javascript or AJAX (mootools is the loader used since I'm using the joomla framework)
Not sure what you mean by "stop the images from pre-loading." If you are running a query can't you just exclude the images? Then use a hover event on each list item that retrieves the image via ajax? Or even after page loads you could just start loading images via ajax.
What exactly do you need help with?
Excluding images from initial db query?
Not displaying images in your list?
Retrieving images via ajax?
Displaying images after retrieving them with ajax?
etc etc