I am not able to handle Iframe popups. In my application when i click on some buttons or link then open iframe pop up. activity which i do on that iframe popup is not recorded in selenium IDE.
select window command also not work.
When i click on link then it open in second window with same title. i am not able to handle that new window's activity.
Please provide me solution if any have.
You need to use the command Select Frame and not Select Window.
Related
Is it possible that a link button can open a tab window with a certain URL even it has also jquery code to perform like showing a popup box?
Let say when I click the link button, it popup messagebox came from jquery code and also open a new tab. is that possible?
jQuery deals with client side
LinkButton is a server side control
Check following STO thread:
Link Button
Also, opening a new tab can be handled by browsers, so some browser may open
a new tab while others may open a new window
I am pretty new in the programming world. I am using Titanium, and I want a button that when I clicked on it, it will go back to the home window. Obviously, the button will be in another window.
I tried win2.open() and win2.show(), but it is not working. Any ideas?
Use titanium navigational controller
https://github.com/vuinguyen/Ti-Navigation-Controller
it would give you button for previous and home window
Jacl,
If you are in second window, just close that window on the click event of your button in the second window.
Try the following in second window
//I'm assuming that you have came from window1 to window2
//and you have a button btnHome at window 2 used to navigate back to home page
var thisWindow = Ti.UI.currentWindow;
btnHome.addEventListener('click', function(e){
thisWindow.close(); //Will close the current window and display the previous one
});
There is a similar question which is used to navigate between windows. Go through Titanium Mobile: cant navigate between pages.
You can use the following links also for references
http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-url
http://docs.appcelerator.com/titanium/latest/#!/api/Global-method-require
Scenario:
Enter a keyword (Position) in a textbox
press Tab or click on the next element
A window popup appears
a list of position matching the criteria will be listed
click the required record
Popup window closes automatically
Alert will be displayed
have click on ok button of alert.
switch to main window and check the position details
Question :- i found many solutions in the site but all are about performing actions on window popup and close the popup then switch to alert or main browser
but my application closes the popup window automatically after selection,hence i cannot use the driver.close() or driver.switchto.defaultContent().
If i dont close the driver (for popup) im not able to identify the next alert displayed after popup.
if i switch directly to mainwindhandle, the alert dismiss is happening instead of accept.
Please anyone who know how to switch from window popup to alert without popup close help is needed...
Thanks ....
If alert dismiss is happening when you are trying to accept it, why don't you use alert.dismiss(), it will probably accept the alert in your context.
When you switch to the popup window, the driver focus is on the popup window. What you might want to do is, just after clicking the required record, switch to the main window then accept the alert.
This must be helpful for you . From your questions, Even after your pop up closes automatically you must be able to access your parent window element by switching back to it. There is no need of driver.close() all the time. Here is the code,
// do something with the pop up and it closes automatically here.
driver.switchTo().defaultContent();
driver.switchTo().frame("your parent window mainframe"));
// try to access your parent window element here
When a user clicks a button, I need a separate browser window to popup. How can I set the modal property of the application? (ie, when a popup window opens, the main application is disabled until that popup is closed ... I need to use a browser window rather than a popup window, but can't figure out how to disable the main application)
PopUpManager.createPopUp (this, navigateToURL( url, "http://www.google.com" ) , true );
thanks!
[[Updated Answer]]
Ok, my modal dialog looks like so:
cg = mx.managers.PopUpManager.createPopUp(this, ChoiceGrid, true) as ChoiceGrid;
PopUpManager.centerPopUp(cg);
But, what I would do instead of what you're asking, is embed an IFrame in the modal popup. This is exactly what we're doing in our app to collect CC data (well, not the popup part, just the IFrame bit. http://code.google.com/p/flex-iframe/
This way, you have the standard modal dialog you're looking for, AND an internally managed 'view' out to your checkout server. Something like this:
<code:IFrame id="iFrameWithJSfunctions"
src="{checkoutURL}" />
The flex-iframe is pretty easy to work with, for the most part. You shouldn't have many problems with it.
[[Original Answer]]
I'm not sure you need a PopUp to do this.
Why don't you simply do:
navigateToURL(urlRequest,"_blank");
instead?
You should think of a Flex App as a self contained entity. The PopUpManager is designed to create Windows (Panels / any UIComponent) that reside over another component inside the SWF. It does not create items that pop up out of the SWF or in new browser windows.
navigateToURL could be used to create a HTML pop-up from your Flex application. However, there is very little--if any--communication between the SWF and the browser pop up. And there is no way to make a modal pop-up.
You might investigate performing an ExternalInterface call and creating your new pop up in JavaScript. Here is an article about creating modal windows in JavaScript. Before going too far down that road, I would think carefully about your requirements. How would feel if one browser window popped open another browser window and prevented you from doing any browsing until you addressed the issues in that window. Or to put it another way, how would you feel if Microsoft Word opened a word document and wouldn't let you edit any other document until you shut down the first one? I'd be pretty upset.
Modal application dialogs are one thing. And the PopUpManager allows you to create those. I would consider Model application windows a bad UI decision.
I have a scenario where I have a popup window open and that will have links to open up another window that's going to pop open on top of the already open popup window. I've tried all sort of tricks (javascript window.open, target="_blank" etc.) but nothing seem to work. It always was opening the page on the already opened popup window.
Any suggestions? Appreciated your help.
You realize that what you're doing with popups is going to be considered by many users a form of spam right?
But to answer: I believe _resource will open them separately.