I need to exit from my roku app from one page ,when i press a specific button.
i was try ,
MainMenuCanvas.Clear()
MainMenuCanvas.Close()
But it does not exit from my app.I need to go to home screen by code.is it possible? The MainMenuCanvas is an inner page comes from some other pages.
You can exit the channel programmatically by issuing the End command... I usually add the following function after my RunUserInterface function, so I can call it directly from anywhere in my code.
Sub ExitUserInterface()
End
End Sub
Related
I've got a button made that calls for such a redirect when you press it:
javascript:window.open('f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=test:NO:P6_MY_TEXT:&P6_MY_TEXT','_blank');
Now I'd like to call the code like this a couple of times from the multiselection list, so that the file save window will show X times. So far I have the code as below, but there is only one window to save the file, and in the console you can see that the loop has passed twice.
let tab = apex.item("P6_LIST").getValue();
tab.forEach(function(element){
console.log(element);
javascript:window.open('f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=test:NO:P6_MY_TEXT:&P6_MY_TEXT','_blank');
})
Usually, browsers will not allow opening multiple windows at once unless you make sure that popup was not blocked.
I'm using Robotframework selenium2Library with python base and Firefox browser for automating our web application. Having below issue when ever a Click event is about occur,
Header in the web application is immovable during page scroll(ie., whenever page scroll happens header would always be available for user view, only the contents get's scrolled) now the issue is, when a element about to get clicked is not available in page view, click event tries to scroll page to bring the element on top of the webpage,which is exactly below the header(overlap) and click event never occurs, getting below exception.
WebDriverException: Message: Element is not clickable at point (1362.63330078125, 15.5). Other element would receive the click: https://url/url/chat/chat.asp','popup','height=600, width=680, scrollbars=no, resizable=yes, directories=no, menubar=no, status=no, toolbar=no'));">
I have tried Wait Until Page is Visible keyword, but still this doesn't help, as the next statement, Click event(Click Element, Click Link etc) is again scrolling up to the header.
Header being visible all time is a feature in our web application and due this scrips are failing, Can some one please help to over come this issue and make the click event to get executed successfully?
So if I understand correctly, when you click an element page scrolls down just enough so it is visible. Because you have a transparent header, element stays under it and cannot be clicked. My solution would be to make a new keyword that scrolls down until element is visible and then scroll down a bit more.
*** Settings ***
Library Selenium2Library
*** Keywords ***
Scroll And Click
[Arguments] ${element}
Execute Javascript window.document.evaluate("//*[#id='${element}']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.scrollIntoView(true);
Execute Javascript window.scrollBy(0, -200)
Click Element ${element}
*** Test Cases ***
Scrolltest
Open Browser http://www.stackoverflow.com/ gc
Scroll And Click hireme
If you know the element is clickable and just want to click anyway, try using Click Element At Coordinates with a 0,0 offset. It'll ignore the fact that it's obscured and will just click.
We can use the Execute JavaScript to click the element. I am using this in Python3.
${Element} = Get WebElement | xpath=//input[#id=image]
Execute JavaScript | arguments[0].click(); | ARGUMENTS | ${Element}
Reference to use ID/xpath as web locator:
Robot Framework: Click Element using Execute JavaScript
how can i access the content property of a controller within the chrome debugger.
I really try to find a way to debug my application. So far i can't find a way to do that.
Thank you
Alex
add the statement
debugger;
in the method you want to debug,
Open Google Chrome, CTRL+SHIFT+i
Hit the URL of your application, navigate to the state where you think the code would run
Google Chrome automatically stops at the debugger; statement and focuses you to the sources/scripts tab as you can see in the picture
Inside the Watch expression tab click on the "+" too evaluate code in your case it would be
this.get("content");
As long as you have this breakpoint you can switch to the console panel and execute the code in that context, whenever you are done you can either close the panel by clicking CTRL+SHIFT+I or the close button down there, you can add breakpoints manually by clicking on the line number as well , Hope this helps
For more info
I'm using Ember Extentions which is not ready yet but certainly usable.
There are 2 possibilities
Use the Ember Inspector Tool for Chrome: It is not officially released yet, but from what i have heard it seems usable. I had no time to try it myself yet, but here is an article telling you how to install and use it.
Get access to your controller in the console of your browser. And then examine it as you like. Here is the code to get access to your controller.I use it myself in my app for debugging:
// i assume that your Ember.Application is stored in the global var App
var App = Ember.Application.create({
getController : function(name){
return this.__container__.lookup("controller:" + name);
}
});
// now you can use it like this. To get the users controller (App.UsersController) just use this in the console:
App.getController("users")
I have a stack of images on which I want to perform some operations. After processing each image, my program should pop up a dialog to prompt the user if they want to proceed with the next image or to abort. Before that, they should have an opportunity to do some manual changes either on the images or on the parameters. Anyway, they must have access to the windows of the applications, while the execution of the method that called the dialog should be blocked until the dialog is closed.
I tried to solve this with a QMessageBox, but if I open it via exec(), it blocks the entire application, and if I use show(), the execution of the program goes on without waiting for user's reaction.
Is there a convenient way to block the calling method or function with a dialog but permit the user to interact with other windows?
Thanks in advance for any hint.
You should split your method that you want to block into two parts. In the end of first part you need to show your dialog without blocking and connect "Next" button (for example) of the dialog to the slot that must contains second part of your old method. This slot will be executed only when user presses the button.
It's the right way to do it in Qt. You need posibly to change your code logic to implement this.
Also, do you really need the second dialog? You can place "Next" button to your main widget. You can also create another modal dialog that will contain some settings and "Next" button.
I am working on a MFC Document View architecture application which has multiple documents and views and a tabbed window interface.
I have been tasked with making an automatic switch to another tab on the press of the OK button in one of the other tabs. When the other tab is clicked on it uses a C++ wrapper over IWebBrowser2 to navigate to a specific web page.
When this is done manually by clicking on the tab everything is fine and the webpage within the view loads successfully.
In my first attempt at doing this the tab successfully switched in response to a call to
AfxGetMainWnd()->SendMessageToDescendants(SOME_MESSAGE, ...);
however by sending this windows message at the wrong point the application would crash once control returned because the chain of events caused the (modeless) dialog (*) that
sent the message, to no longer exist.
I then found the correct place to make the call, but now when the other tab is activated, it no longer displays the webpage as it should.
To debug this problem I added code to check the READYSTATE in both the situation where it works and the situation where it does not. When the page fails to load (despite the call to Navigate2 returning S_OK), the READYSTATE just stays at READYSTATE_LOADING.
Unfortunately now I am to many edits away from when I had it partially working.
I have added TRACE statements to the most obvious events such as OnSetFocus, CView::OnActivateView but all traces come out in the same order despite the behaviour being different
* hosted in the view