Appium doesn't update it's view in list element and subelements - ios

I am working on iOS native app and when trying to read from tableView/tableCells I have a problem getting the updated values. At the first time i enter the page/screen I can see all cells. But , if i create an action that adds another cell to the table view when I try to get the list of cells I see an empty list.
Also, When i change a subelement in that cell I can't see the changed sub element both in inspector and in the code.
I tried switching to a different page and also changing tabs in that page and reread the table/cell and subelements but it didn't help.

I've had this issue before. There is no actual reload elements kind of function that I've seen. However a workaround I've found that works is to simply find an element that exists and it'll reload the elements after it does that.
For example:
yourMethodThatLoadsNewElements();
driver.findElementBy(pathToElementThatExistedBefore);
driver.findElementBy(pathToElementThatWasJustLoaded);

Related

AG-Grid footers in tree mode not updating

When updating a tree that uses footers in React, none of the footer columns are updating once rendered once.
To render the footer once, I can either start the tree expanded, or expand a row to create the footer row. Once rendered, the values never change even when collapsing and re-expanding the row.
I'm not sure why this behavior is different between the grid modes. After many sleepness nights, my current working theory is that the inferred footer row is not being updated or linked to the original row correctly.
There are a couple of discovered workarounds/clues:
1) deltaRowDataMode=false will work as expected. Because we work with react and immutable stores, I believe we still need this mode to be true.
2) Changing the ID field when doing an update also works as expected. To build a full composite key for our table to detect any change, however, would be very complicated as we can have up to 50 columns as a worst case scenario. The key size would also be huge.
//full plnkr example: https://embed.plnkr.co/Ty1AdL2oQzk9MUqnTHQs/
<AgGridReact
columnDefs={this.state.columnDefs}
rowData={this.state.rowData}
treeData={true}
animateRows={true}
groupDefaultExpanded={this.state.groupDefaultExpanded}
getDataPath={this.state.getDataPath}
autoGroupColumnDef={this.state.autoGroupColumnDef}
onGridReady={this.onGridReady}
groupIncludeFooter={true}
groupIncludeTotalFooter={true}
deltaRowDataMode={true}
getRowNodeId={data => data.id}
groupSuppressAutoColumn={true}
/>
I expect the footer values to change when the total row changes, including the name. Using the first workaround (deltaRowDataMode=false) will show the desired behavior.
Any insight into the cause of the re-rendering issue would be appreciated, or a fix to what I may be doing wrong.
As an alternative, groupRowAggNode can be provided that does update as expected. Still unsure why the original problem exists though.
Example:
https://next.plnkr.co/edit/0zTN0RNzapWbtfTW?preview

Codename one list scrolled down when returning to form

I've had some testers reporting an intermittent issue on a search page that contains a list.
They say when they have been on the page and navigate to a sub page then return that the list is sometimes scrolled all the way to the bottom of the screen.
I've disabled tensile drag on the list, but I wanted to know if there was any other work-around for this issue?
This has nothing to do with tensile drag. When you navigate from one form to another in the old GUI builder the form is re-created from scratch and re-positioned based on the data.
We try to select the previously selected item but if something in the list changed this might trigger issues.
You can override restoreComponentState in the state machine with a blank implementation to see that this is the cause of this behavior. Assuming that it is you can create a special case for the list instance.

How to reload parent view in Vaadin without table reseting sort order

I'm using PagedFilterTable in Vaadin to manage pagination. When loading default page, I have set something like this - and I include sorting by some field:
if(this.sortField != null){
table.setSortContainerPropertyId(this.sortField);
table.setColumnWidth(this.sortField, 80);
table.setSortAscending(true);
table.sort();
}
So that happens when the page is loaded and that is fine. After I submit new entry (entries are being added through new, popup window), table gets new row, but the table loses it's sort order in view after popup closes, so sorting is no longer keeped. Problem is I do not know how to get to that table element from that popup window and set sorting again. Why table is being updated and I see it, and sort doesen't? Problem is bigger because I have both windows in separate files and seems to me I can't grab table element easily without modifiying the logic because I am in another window.
How to reload table so that the sort stays same?
I managed to do this after submit:
getUI().getPage().reload();
With that it works, but I am not satisfied. After that line of code, everything reloads again (meaning all queries execute again). Result is good but I don't want after submit whole reloading of page happens (also because none of my other buttons do reload). So I would like only to reload table in parent window.
How can I grab table object from outside window and for example set it's change to immediate and correct change?
Something like this I suppose needs to be written:
getParent().getUI().setImmediate(true);
?
Or better question, how to manage to table sort remains the same after inserting new entry through new window?
I managed to solve it. On the parent window in the windowCloseListener I just added:
myTable.refreshTable(data);
myTable.sortTable(); // my custom method that was Invoked on the page load too

IOS: UITableView with search: displayController not selectable?

I'm a newbie trying to create a simple sample app that takes json data from a website and list it on a UITableView.
Each voice in the UITableView is clickable to show more details.
I started from this example/app because it was clean and working:
http://nscookbook.com/2013/12/ios-programming-recipe-16-2-populating-a-uitableview-with-data-from-the-web-ios-7-and-afnetworking-2-0/
What I was missing was a searching function, so following this other page and adapting code I got it working:
http://www.appcoda.com/search-bar-tutorial-ios7/
The only problem I have is that when I search for something I get correct results filtered, but the list of results it's not clickable (to go to the details view/page) and it does not contain the small 'Rating' subtext.
Basically the filtered list only gets the 'Name' and nothing else of the original array, and the cells are not clickable.
What am I missing?
I solved eventually the issue using a SearchBar without its own display view, so basically refreshing the main tableview (already configured to show all details) if/when something is searched.
The search simply filter the main array and in all functions to display the result I show either the main array or the filtered one.
Thanks!

jQuery mobile Trigger create doesn't completely work with element added through DOM

I have to add istantly some items without reload the page. After adding these elements I call
$('#one').trigger('create');
But not everything changes as it should (screenshot: http://www.ianaz.com/9a7c50414.html )
The background stays grey, the icon at the right is not added and the text becomes link.
It does not transform everything in a list "button". The third component in the screenshot is as should be.
Do I have to call another method?
Thanks
Just before you call create,try to call listview("refresh") on the list.For eg. if list is the id of the listview,following code should be used:
$("#list").listview("refresh");

Resources