I'm trying to create a macro that just scrolls down to the bottom of the page on a typical "endless" page such as Facebook. Then I will Set the Max Loop and click "Play (Loop)" based on how long I want it to go.
IMacro 9.0.3 in Firefox 49.0.1.
'SET !WAITPAGECOMPLETE YES
URL GOTO=javascript:window.scrollBy(0,20)
WAIT SECONDS=1
It runs for maybe 20 seconds, then gets error:
Page loading timeout, URL: javascript:window.scrollBy(0,2000), line: 3
(Error code: -802)
If I include the !WAITPAGECOMPLETE, I get this error:
Unsupported variable !WAITPAGECOMPLETE, line: 1 (Error code: -911)
Alternatively I tried the timeout based on this Stackoverflow Question.
'SET !WAITPAGECOMPLETE YES
SET !TIMEOUT_PAGE 3
URL GOTO=javascript:window.scrollBy(0,2000)
WAIT SECONDS=1
and it often gets this error (even when I just click the "Play" vs the "Play (loop)" button.
Page loading timeout, URL: javascript:window.scrollBy(0,2000), line: 3
(Error code: -802)
Try to play the following code in loop mode:
EVENT TYPE=KEYPRESS SELECTOR=* KEY=35
WAIT SECONDS=1
Related
I am using apex 21.1.
I have built a report with a form. The report page(2) has another region "Param" which has item P2_DEPTNO. The form(Modal Page -3) is for creating new records and editing existing records. There is a CLOSE DIALOG process in page 3 and it has P3_DEPTNO as a value for "Items to Return" attribute. Page 2 has a DIALOG CLOSED dynamic action with a true action of SET VALUE that sets P2_DEPTNO with the value of P3_DEPTNO. This is when I should call page 4 in a new tab(when P2_DEPTNO is assigned P3_DEPTNO's value.I am calling page 4 using the code...
apex.navigation.openInNewWindow('f?p=&APP_ID.:4:&APP_SESSION.:::4');
Unfortunately, it does not work and I do not know why. However, if the dynamic action is of type Alert, it works fine and displays the alert when P2_DEPTNO's value changes. What could be the reason for that?
ws=ESLAM_WS
un= forhelp
pwd=Forhelppwd$
app= Call new window
pages= 2,3 and 4
P.S: It works if I change P2_DEPTNO's value manually. But I need it to work when the SET VALUE dynamic action set it's value.
I tried to log in into you app, added another dynamic action event "Execute Javascript code" and entered your code without ':::4' part and it worked well for me.
so:
apex.navigation.openInNewWindow('f?p=&APP_ID.:4:&APP_SESSION.');
(also I have left an alert there that you mentioned worked anyway). If someone else fixed it meantime, I hope she/he will document here what she/he did.
I'm building a custom Chromecast receiver based on the [CAF SDK][1]. I've tried to set the receiver application in IDLE state mode for handling the splash screen during the 5 minutes after the media has ended...
I tried to use :
var video = document.createElement("video");
video.classList.add('castMediaElement');
video.style.setProperty('--splash-image', 'url("img/logo-mySplash.svg")');
document.body.appendChild(video);
var context = cast.framework.CastReceiverContext.getInstance();
context.setInactivityTimeout(300);
playerManager.addEventListener(cast.framework.events.EventType.ALL,
function (event) {
switch(event.type) {
case 'CLIP_ENDED':
context.setApplicationState('IDLE');
break;`
}
})
When the media ended, the receiver dispatches :
{type: "CLIP_ENDED", currentMediaTime: 2673.986261, endedReason: "END_OF_STREAM"}
{type: "MEDIA_FINISHED", currentMediaTime: 2673.986261, endedReason: "END_OF_STREAM"}
and sends error to debug console :
[ 32.846s] [cast.receiver.MediaManager] Unexpected command, player is in IDLE state so the media session ID is not valid yet
I can't find any documentation about this issue. Thanks anyway for your answers.
The context.setApplicationState simply updates the application's statusText. See: https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.CastReceiverContext#setApplicationState.
What you probably want to do is add a listener to the playerDataBinder on cast.framework.ui.PlayerDataEventType.STATE_CHANGED event. This way you can make your idle screen visible whenever the state property changes.
Also, in order to get the full advantage of using CAF you probably want to to use the cast-media-player element. Additional information on the benefits of using this element instead of a custom video element can be found here: https://developers.google.com/cast/docs/caf_receiver_features
I have one page where i have about 8 tab region. Each region has a select statment. They are executed when accessing the page (page load) at the same time. Because i have 8 select statment that executes at same time it leads to pure performance.
My question is how to execute the query only on active region.
You can try this one
Create Dynamic Action on event "Page Load"
Create true action "Execute javaScript Code":
window.setTimeout(function(){
$('.a-Region-carouselLink').click(function(){
apex.event.trigger(document, 'tabChanged', this);
})
}, 500);
Set "Fire On Page Load" to "Yes"
Create Custom event "tabChanged"
Create true action in DA custom event "Execute JavaScript Code":
console.log(this.data);
Test it - each time you click the tab, DA prints to console currently clicked anchor.
Of course it is not perfect because of the 0.5s delay. Still it allows you to listen what tab was "clicked".
To make your scenario work I would do:
create page item PX_TAB
create true action in custom event to set value of PX_TAB
create true actions in custom event to refresh reports within tabs
set "Page Items to Submit" to "PX_TAB" in each report to be refreshed
add condition to each report comparing value of item PX_TAB - it will execute SQL query only when PX_TAB has expected value
edit 2016.08.13
You can bind tabs by simple adding listener to the tabs
$(document).on('mousedown', 'a.t-Tabs-link', function(){
//this is an anchor used as tab
console.log(this)
})
If you want to keep it in APEX way enter code from below in Execute when Page Loads page section or create new dynamic action On page load
$(document).on('mousedown', 'a.t-Tabs-link', function(){
apex.event.trigger(document,'tabChanged', this);
})
and then add dynamic action bound to Custom event named tabChanged. Whenever tab is clicked the tabChanged event is triggered, and in Execute JavaScript Code you can reference current tab by this.data
Try to create buttons and set behavior of each button to display required region and hide others (create hidden item, then create buttons that set values 1,2,3 etc., then add conditions to every region to display region 1 only when hidden item equal 1, region 2 for item value 2 etc.
Please explain how to change a "hidden variable", say p_show_variable, to NULL whenever page is reloaded.
I have a conditional report in a page , and the requirement is whenever any variable changes and that "Submits" the page , then p_show_variable should become NULL, thus hiding the conditional report.
Create unconditional PL/SQL proccess on your Page Rendering. Add some code:
BEGIN
:P_SHOW_VARIABLE := NULL;
END;
You can also add some condition on proccess, for example, Request=Expression. Change button action to Redirect and set Request value. Use this value as Expression in process condition.
Or set condition for proccess When Button pressed and set button name.
I am using Foundations Joyride plugin in my web app. What I am trying to achieve is something like where the user can say that never show me again button on each step.
For example I am on the first item their I want two buttons, Next/Don't show again.
Is there a way to get that?
I had this issue and solved it by making a separate popup in the same style which came up to prompt the user to do something else (in this case start a video) or start the joyride.
On this we also included a checkbox called 'never show me this again' and then stored the result in a cookie to make sure the box didn't auto-popup when reloading the page.
The following code should help (you will need to set or clear the 'show_joyride' cookie yourself - we use js.cookie.js):
var showJoyride = Cookies.get('show_joyride');
// Setup joyride but tell it not to auto start
$("#joyRideTipContent").joyride({
autoStart : false,
modal:true,
expose: true
});
if(showJoyride == 'true'){
// Start the joyride
$("#joyRideTipContent").joyride({
modal:true,
expose: true
});
}