I am pretty new to PowerBuilder so I am going to try to explain my problem the best I can in depth. Currently I have a Main window that has an admin menu programmatically nested inside of it. When clicking this Admin button the admin window pops up and I know that this works, but I cannot find out where this window actually is. My goal is to create a new button in the admin panel.
elseif vis_menu = ADMIN then
if page_name = "Admin" then
btn_admin.triggerevent(clicked!)
Related
In MATE desktop in Fedora 28, I have set a shortcut for switching windows using a popup window to Super-j. I've discovered AutoKey that allows you to re-map the keys for certain applications/windows. It has a script that tells you what the window class is. But with the popup window, the widnow disappears too fast and the script can't quite grab it as you need to click on the window. Is there a way to get the window class of this popup window? I want to re-bind left key to Super-h while the popup is active. Or is there another way to achieve this?
I see that you've already found another solution, but I thought I'd add an AutoKey solution, too:
import time
mouse.wait_for_click(1)
time.sleep(0.2)
winClass = window.get_active_class()
dialog.info_dialog("Window class", "Active window class:\n\n'%s'" % winClass)
I need to open multiple tabs within a single browser and i need switch over all the tabs.
Give me your suggestions. Thanks in advance.
I'm not so strong in capybara. so, i'm giving solution to switch over between tabs using selenium.
For a instance you clicks a button in a web page and it will open a new page.
The new page may open in a new tab in the same browser window or in a new browser window. That is not controlled by selenium. It will control by the browser which you using.
For a instance take firefox, goto tools->ptions-> tabs-> open new windows in a new tab instead check the option. For example, if you clicks a button it will opens a page only in the new tab of a same browser window. For a sake if you unchecked mean it will open a page in the new browser window. Likewise every browser has its own settings.
Try this code:
new Actions(driver)
.sendKeys(driver.findElement(By.tagName("html")), Keys.CONTROL)
.sendKeys(driver.findElement(By.tagName("html")), Keys.NUMPAD2)
.build().perform();
In above Keys.NUMPAD2 refers that you are gonna move to the second tab in the session.
You can move to Third, Fourth, etc... by giving NUMPAD3, NUMPAD4, etc... respectively. Here i am using windows OS, if you are in some other OS use their shortcuts.
I hope this will help you.
You can use this exact function in Ruby:
page.driver.browser.switch_to.window(page.driver.browser.window_handles.last)
When I create SHBrowseForFolderW dialog the default control is OK, what I need to do is make SysTreeView32 active so a user can right on use arrow keys to adjust the desired folder. I tried to use this code : http://comp.newsgroups.archived.at/os.ms-windows.programmer.win32/200505/05053122835.html which wokrs ok in finding the HWND of the dialog but using WM_NEXTDLGCTL has no effect on the window.
Maybe I should send TAB keystrokes to the window, or I don't know any other opions ? Are there swiches in creating the browse dialog what control will be highlighted when the window create ?
Ok, the thing is difference between PostMessage and SendMessage. I mistakenly used the later here. They are not the same!
I am using AutoIT within Internet Explorer to navigate from one web page to another
The code I am using is:
_IENavigate($oIE, "http://www.google.co.uk")
However the web page that it is coming from displays a JavaScript popup box. I would like to click the OK button to allow the Navigation to proceed
I have tried using the following code:
ControlClick("Windows Internet Explorer", "", "[CLASS:Button; TEXT:OK; Instance:1;]")
However this doesn't work due to the fact that when the dialogue box appears the AutoIT process seems to pause itself.
The title on the dialogue box is "Windows Internet Explorer" and there are two buttons. The button I would like to click has the text of "OK"
Has anyone else come across this before? If so how can I solve this problem?
_IENavigate by default waits until the page is fully loaded. The dialog box may prevent a page to be fully loaded. The correct solution would be to:
_IENavigate the page without waiting for the page to fully load
Wait until the dialog box appears and close it
Wait for the page to fully load
The parameters for _IENavigate are like this, and you need to set $f_wait to 0:
_IENavigate(ByRef $o_object, $s_url [, $f_wait = 1])
To wait for the dialog box to appear, you will probably simply repeatedly attempt to click it until the ControlClick function returns it did so successfully.
I'm building a GUI using Tk/Tcl. during the use I create a new window which has some properties in it for the user to fill up. I want that my main window will be unusable during all time that the properties window is not closed, and only when it's closed to bring back the option to use the main window.
How do I do it?
I create the new window using toplevel .prop_menu
use grab. See also http://wiki.tcl.tk/grab and http://wiki.tcl.tk/3326