How to get the all the recyclerView Items into ArrayList using appium - appium

I have a scenario to verify the Sort&Filter functionality for Mobile App in Android.
Scenario:
Search for Item
Search Result Apper
Sort&Filter with some criteria
Have to Verify that Sort&Filter is applied correctly
Here results are added to RecyclerView.
As per RecyclerView/appium functionality, all the items are not loaded into view. Only visible Items are loaded into the view Hierarchy.
When I scroll Up the Linear Layout Indexes are re-arranged. I could not able to get all the Items.
Could you kindly provide me any sample scenario of this kind?
Or How can we achieve this kind of scenarios in Real Automation while working on the project?
Regards,
Shiva Oleti

Issue with Android as You stated is that it "sees" only what is visible on screen. I have similar issue, so I had to go deeper into element and fetch text. In your case I would do following:
1. Search Result Appear:
- fetch all visible elements, input search, fetch again -n results containing search result. Eg. if input 'beer' there should be eg. 4 elements with text containing "beer". Put elements in list and iterate:
List <MobileElement> listElements = driver.findElements(By.id("someId"));
for(MobileElement el : listElements){
if(el.getText().equalsIgnoreCase(expected)){
// do some validation //
}
}
Search Result Appear:
input exact value that will return unique, one result so You can easily count.
Sort&Filter with some criteria
remember initial values in items (text like 'Budweiser beer'), do some filtering / sorting, and check text in first element if is changed and if correct logic is applied (eg. sort desc.)
Have to Verify that Sort&Filter is applied correctly
think I answered in 3.
Basically:
'pick' text from items store them,
do some action (search, sort, filter),
'pick' newly changed items caused by 2. step, store them,
compare (depending on what You need...),
To get all items you have to swipe and store them in list.

Related

Alternative to "ArrayFormula" in GoogleSheets

I have been trying to create a production scheduler in google sheets.
Each tab is for a different department to fill out.
Ideally, one person enters the Order summary in the first tab. The next tab gets updated and someone else fills in the relevant details and it goes to the final tab.
Is there a way to automatically add rows to other tabs while having the ability to sort?
I have been using =arrayformula() initially but I realise the if I try sorting in other tabs, it messes up that sheet. I also tried =sheet1!A1, but I want to restrict as much input by other members.
sort it by formula. example:
=ARRAYFORMULA(SORT(A2:C; 2; (D1="asc")*1))
where D1 is a dropdown with asc,desc and we sort the whole array via B (2nd) column

Remove Item from list - remove unnecessary item from the list (Power Automate Desktop)

Currently i'm on project scraping a data from website. The data is not a text or numeric value but it contains canvas element produced number phone as canvas image. My first method to scrape this data i'm using OCR Text Recognition in Power Automate Desktop which collect all text specifically from the webpage coordinates. I'm able to get the number, but it also scrapped unnecessary number and text from the coordinates. So i'm filter it using Recognize Entities In Text action in PDA(Power Automate Desktop) and able to filter the number phone.
But the problem is, when im running the action it will add new phone number to the new rows and also produced unnecessary number which is 000000 in the item list row.I tried to get rid of the unnecessary number by using remove item from the list action and it get rid of it. But it also remove my other item which is NULLED to differentiate which product does not contains phone number from the list.
I want the list result write to excel file, without removing NULLED from the list only remove 00000 from the list.So the list will be transfer to excel row by row

Modify the auto-complete behavior in cell dropdown

I'm building a searching sheet, which take a dropdown cell as input data. User can select from the list, or type in the key word. Searched data will be populated by rows/column with my query formula. The search result itself works just fine.
However, the drop down list doesn't.
Here's a picture of my search.
As you can see in the picture, autocomplete would only populate 6 items, while my search query produce much more, which is exactly what I need. It's clear enough : Autocomplete compare the whole text, not word - by - word.
Is there anyway to change this behavior ?
My sheet is for other people to look for a specific item. I cannot expect them to know what I have entered in my database and force them to search by those exact keywords.
Anything from script to formula is fine with me. I just need at least, a lead..

Orbeon 4.10 - Fill Repeat Repeated Grid from Checkbox

I want to fill a Repeated grid with value from a checkbox.
User would select multiple items from a checkbox then hit a button to add the required number of rows and set the value of a field in each iteration according to what was checked
I would need something like a foreach checked value : run this code
I'm having a hard time finding documentation about this kind of Xforms. I did find some info about Iterate and Iterator that seems promising but i failed to make that work.
I was able to add the required number of row to my grid but then im not sure how to use xf:setvalue set the value of each row.
Any help appreciated.
I think a combination of the iterate attribute to create a loop, the xxf:split() function to get the selected values as a sequence you can iterate on, and xf:insert to create elements will do the trick. See this example, which does the following:
And here is an example which does the same, but for a form created with Form Builder. In this case, the result is as follows:

Hyperlink from a count query to extract associated data in access

I have a Count query that uses multiple criteria to produce a result looking like:
count ID
1 "abc"
4 "bcd"
5 "def"
1 "cde"
This shows how many times the ID appears in a given database. The datasource is through an odbc connection that updates automatically. So the ID values change everytime it is opened. I would like to try to turn the unique ID or the associated count into a hyperlink that when clicked will return all information involved in the count (*note the database has much more information associated with the ID's than is counted, a date range of the previous three months is applied.) Can this be done simply?
Database format:
ID Instance Device DateBeg DateEnd
Thanks in advance,
LP
The short version -
This should be simple to do using a report (but could also be done using a form I will be explaining how to do a report for this version). You would just make a report that includes all of your fields then call the report on click. It is important to mention that you will need to view the query via a form to make this work.
A more detailed version -
The first step will be to make a form based on your query (you will not be able to do this directly from a query). To do this select your query then click on the create tab then click Multiple Items Form. Adjust as needed.
Then create a report that shows ALL of the records how you want it to display. (I will call it rpt_ViewDetails) (we will limit later)
When you are done adjusting click on the field that contains the "abc" etc. results (if this is a calculated field it will be more complicated.) I will call this field "Criteria" for the example. Go to the events tab on the property sheet (in design view). use the On Dbl Click event and go to code builder.
This is what the code would look like (place in between the private sub.... and the end sub lines of code):
DoCmd.OpenReport "frm_ViewDetails", acViewNormal, , "[Criteria] = " & Me.Critera
Let me know if you have any trouble with this, also let me know if the structure is different than I am assuming, I will need a more detailed report of what the query is doing if this is the case, what the structure of the database is etc.

Resources