I am using Android-pdfview library to display pdfs within my application.
pdfView.fromFile(new File("/path/to/file")).defaultPage(1).enableSwipe(true).onPageChange(this).load();
How to use AnimationManager from Android-pdfview library ?
For example, I want to show each page for 10 seconds, and move to next page automatically without user interaction. Once last page is reached, loop again.
Related
I have a webpage that I made with spring framework in java. In some of the pages they can get a list of clickable rows, but if you select a range that is too large fe. 1000 rows, it freezes and the javascript needs some 20 seconds to put buttons and such on each row.
I know that in android developement one would use recyclerView to load only a portion on the screen and would load more as you keep scrolling. Is there something similar I can use in my webpage to achieve a similar result?
What I ended up, using was infinite scroll https://scrollmagic.io/examples/advanced/infinite_scrolling.html
then I seperated my JSP list page strictly from the "forEach" part into an another JSP document that the first JSP would call using something like
$.get("${endpointName}"+"?queryIteration="+ queryIteration+ extraVariables, function( data ) {
$("#mycontent").append(data);
if($("#queryCounter"+(queryIteration)).val() === 'true'){
$("#loader").hide();
}
end then in the endpoint I would add
model.addAttribute("endpointName", "listMaterialTests");
model.addAttribute("queryIteration", queryIteration);
if(queryIteration==null || queryIteration==0)
return "materialTestList";
return "materialTestListRows";
I would modify the services to load 100 rows at a time depending on what the queryIteration value is
I am automating something for a website and at some point, the user has to manually fill out a captcha. How would I wait until the user correctly finishes the captcha to continue?
There are some of things you can do depending upon how your page behave that you are automating, its hard to exactly say with out looking at the page
If your save button does not enable until user put the captcha you can run a for loop and only break if the button is enabled
If your save button does not let move forward without putting the captcha and that check its doing at java script lever without reloading the page, you can just keep clicking the button in a for loop with a wait after each click.
You can also check the textbox where user put the captch in a for loop and can only break the for loop when user type certain number of char.
these are some ideas.
I'm writing a test when you get all the links from the website and click them. But I need to click some links that in the beginning are hidden or some links that appear only in other pages. Till now, I'm only got to the point that test gets all the active links from homepage and clicks them. I'm new to Selenium webdriver and java, so can you suggest how should I write the test that checks for new appearing links after clicking one or something similar?
I usually write my Selenium tests much more specifically, but were I to attempt this I suspect I would start by making use of findElements(By.tagName("a")) to get all currently available anchors, probably put them into a data object which included if that anchor as been clicked yet and put those data objects into a Set. Map that Set to the currentUrl to keep track of what links were found on what pages. After a click (and recording that you clicked that anchor in its data object) you could check the currentUrl (without any #s) with the last one (without any #s) to determine if that click loaded a new page. If the urls match, I would call findElements again and add those to the existing Set. If they don't match repeat the process for the new currentUrl. Some additional things to be aware of would be handling new Windows and frames, which would require a switchTo and iterating through all the frames (and nested frames).
I am running an applet in IE which is generated from an external VLX file.
The VLX file is pulling data from a database and when a user hover overs a specific icon when the applet is running, a hover over table appears, with four strings inside, more specifically one of the strings is a URL.
When viewing source it is not possible to see these string values, as they are generated by the VLX and then used by the applet, so the only code you can see is the applet code.
Is it possible to retrieve these strings? As I want to be able to use the URL to open a new web page.
I have it so when a user double clicks the specific icon, an alert is present to show where I am on the page, and within this event I need to use URL value.
This is not possible with the document.getElementById as these values are not accessible in the html.
I am using the p:poll tag to display a live chart. I am using jfrecharts here so , basically the poll will update the image every 15 sec.
The problem is that i need to render an image soon as the page loads. But instead the poll delays from the first load. Is there any way to set the initial poll interval to Zero and for all other subseequent ajax calls poll with 15sec interval.
Regards,
Gayan
Invoke same action method (of the p:poll) on page load
like described here:
JSF 2 invoke action method on page load
---OR---
You can execute the same action of the p:poll on page ready , for example make a button with same action , make it hidden and on page load you can .click() on this button with jQuery.
---OR---
Set the interval value to something like #{myBean.intervalValue} , and setting intervalValue into zero , and on the pool method check if its zero and if its so set it to 15 (dont forget to update the p:poll itself so it will reevaluate the intervalValue)