How we can refresh page until certain text is appeared on UI using karate framework? - user-interface

Scenario is as below:
Upload file in s3 bucket.
Open the application
Refresh page till the data from uploaded file is appeared on UI
I have tried refresh(), waitUntilText, waitUntil till text is appeared. However, its not working. The text is appeared after some time (which is not consistent to provide delay) and need to refresh the page to have check is the data is updated on UI under certain web element.

Related

SpringBoot2 how can I load newly added resources when running

I'm working on a web program.
In a controller, I create a picture using JfreeChart and save in /resources/image/.
But I can't load it on the web page immediately yet I can see the file under the directory. About 10s later, it can be loaded.
I'm not sure if I need to refresh resources in my code, And how should I refresh if needed.

Initial Files List on demand

I have 6 fineuploader instances in a single page but different tabs (show/hide divs). I do need to display previous session uploaded files, but my challenge is that if all fineuploader instance starts to display in all tabs, it is going to long time for user to see first tab as each uploader instance will have 50-100 images.
My question....is there any trick in which I can trigger the fineUploader init files upon user clicks on the tab?
As of Fine Uploader 5.6.0, you can add initial files to the library at any time with the addInitialFiles API method. So when your user clicks on the tab, you can retrieve your initial files list from the server (or wherever it exists) and then pass this data to addInitialFiles.

Uploading files in ASP.NET MVC using AJAX

Below image depicts a screen in my sample application which has
file upload functionality.
Below are the steps I followed to upload and save files in Database.
In this screen once user clicks "Browse" button and selects the file(s) that need to uploaded, an AJAX request will be made to server(MVC application) for each file selected.
For each upload AJAX request, server will save the file data(byte array) in session array variable and sends JSON response(which has file name and file size) to Browser.
Browser will display JSON response.
Once user clicks the "Submit" button , the file information which is already there in session variable will be stored in Database.
Following above approach I could implement the desired upload functionality.
Question: I would like to know whether this approach is correct, am I making
any mistake?

Primefaces Ajax response fail randomly

I am using p:datatable and on clicking of row (Command link) I am displaying a panel. Most of the time it is working fine but in regression testing some time it is getting hanged but request is going to ManageBean fetching all the data.
But it is not rendering the panel. This error has no specific pattern. I have put log in all possible place even in phaselistner lifecycle everything looks good.
I checked in firebug response is also coming. from server
I am using weblogic 10.3.6,primefaces 3.5 and internet explorer 9.x
Try putting in a component in the page where the data table lives. This displays Ajax events and alot more. Then compare the log output for when it succeeds against the output for when it fails. This may point to DOM as was suggested or somewhere else.

Uploading and saving images in mvc 3 before post

I have a problem with images in my web app. let say I have a form where there are some text fields, dropdowns, upload ajax control for multiple image upload and button Save.
I know how to upload images and posting a form and saving everything to database but the problem is that I want to achieve the following user experience:
User can upload multiple images and browser after successful upload shows thumbnail (this I know how to do it)...the problem here is that I do not want to save images to db before button save is pressed. Is there any convinient how to save temporary images...I have tried temp table which after button is pressed, copies all images to image table but here is browser refresh problem that looses all the data and images stay in a temp table. Can you use a session for storing temporary images or any other way (I think session is not particulary good idea for such things.)
One easy way to achieve that is to use the HTML5 File API and display a thumbnail once the user selects a file to upload. You don't even need to waste bandwidth as everything happens on the client. Once the user submits the form, then the image will be uploaded to the server.
Another possibility is to use one of the gazillions of available AJAX upload controls such as Uploadify, Valums Ajax Upload, Uploadify, the jQuery form plugin, ... which will allow you to upload the file to the server using an AJAX request so that you can resize it there and return the resized image to the client that you could display the thumbnail on the client.

Resources