To download modified copy of Selenium RC Server (To handle modal window) click here selenium-server.jar
Tag this link to see more updates on Selenium server.
Recomended:Open Source Automation framework
Subscribe to:
Post Comments (Atom)
The examples shown here are hacks and workaround to deal with Selenium RC. The functions are included in a wrapper class that wraps DefaultSelenium of Selenium RC.The wrapper class is a framework implementation in C#. Context: _selObj is object of DefaultSelenium class.
This server jar file does not solve the modal dialog issue.
ReplyDeleteIs there any other changes that need applying for this new function to work correctly, I've been over and over your previous posts and configured as stated in posts, but cannot get the Return Value to work... please review my post and reply, I'm going insane here trying to figure this hic-cup out! Thanks for all your hard work Amit!
ReplyDeleteHi!
ReplyDeleteThe modified Selenium server handles the return value. This has been tested across various modal dialogs. It would be good if you can share the scenario where this is failing. Is your application on net?
Swift Reply, Thanks!
ReplyDeleteI'll post in two parts as to big for one post.
No sorry App not on the net, my scenario is like so;
I run though basics entering details to my App, then comes a section where I need to enter details into a Modal (iframe) dialog popup, then click on a submit button to return the values, but this is where Selenium falls over.. It does seem to close the Modal screen but the outer Frame holding the javascript is still visible and will not close even with the /null/ option.
Snippet of code used:
selenium.click("//div[@class='searchbuttons']/a/span"); //opens Modal popup
Thread.sleep(2000);
selenium.getAllWindowTitles();
selenium.selectWindow("title=Search Results");
selenium.click("id=_controlwizardNavControl1");
// clicks Next button in Modal
Thread.sleep(2000);
selenium.getAllWindowTitles();
selenium.selectWindow("title=Search Results");
selenium.select("titleCode", "Text");
selenium.type("addressLine(HNNO)", "Text");
selenium.type("addressLine(STRN)", "Text");
selenium.type("addressLine(TOWN)", "Text");
selenium.click("autosubmit");
// on submit button is where the issues comes into play...
I can't seem to close the Modal fully and have return values entered back to parent.
ReplyDeleteI checked the outher frame to see whats stored there and it mentions the following -
// Some background on the code below: broadly speaking, where we are relative to other windows
// when running in proxy injection mode depends on whether we are in a frame set file or not.
//
// In regular HTML files, the selenium JavaScript is injected into an iframe called "selenium"
// in order to reduce its impact on the JavaScript environment (through namespace pollution,
// etc.). So in regular HTML files, we need to look at the parent of the current window when we want
// a handle to, e.g., the application window.
//
// In frame set files, we can't use an iframe, so we put the JavaScript in the head element and share
// the window with the frame set. So in this case, we need to look at the current window, not the
// parent when looking for, e.g., the application window. (TODO: Perhaps I should have just
// assigned a regular frame for selenium?)
Other than that I'm not sure if this issue is on my side or something I'm not setting up correctly...
BTW, I'm using ProxyMode to run my scenarios as I recieve Js errors in IE if I don't.
If you need more info on this please do let me know, I'm also willing to record my steps and place my video on the interwebs for you to easily view and see whats happening. if that's any use to you?
basically it seems your code does work fine but is somehow falling over when it come in cantact with a Modal with embedded iframe, but I noticed in your blog thats what this new fix handles.
Any ideas what is wrong?
I appreciate you replying and giving this a go, I can use all the help i get at this point.
Thanks you Amit.
It seems you are missing to click the first button that opened up the modal dialog. To get the modal returned value back on the parent page, we are suppose to click on the same button again which initially has opened the modal window. As this is a workaround we got to go some extra miles to achieve our target. Briefing down:
ReplyDeleteClick parent button (say A). Modal Dialog appears.
Select Modal Dialog.
Perform Modal operation.
Click submit to close modal dialog.
Select parent window.
(If required move to the same frame where initially we were)
Click parrent button again. (A)
Hope this helps you.
Hi Amit,
ReplyDeleteI am trying to test a modal dialog using your modified program. I used your workaround(selenium-server.jar) and selenium-java-client-driver.jar(Ver.1.0-beta-1) to test on IE6 and IE7 with the scenario you wrote. The modal dialog can be opened successfully, but it still failed in exchanging values between main window and dialog.
If it is possible, could you show me a successful sample(including test tools and their version, sample application and test scenario)? So maybe I can know how different with my test environment.
Thank you in advance,
Loline
Hi Amit! I'm the poster from September 21, 2010 8:48 AM post above, I'm just replying to let you know your fix worked! I wasn't focusing on the parent screen before looking to click the same button that triggered the modal popup and I had to use selenium.selectWindow(null); first to find the button, also I was in ProxyInjectionmode which I now turned off and it's all working smoothly as can be... Thank you very much Amit for all your hard work! Appreciate it ; )
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteCould you give us a complete sample.
ReplyDeleteI try this solution for 3 days without success. Always something wrong, like Could not find window with title xxxx
Thanks in advance
Hi!
ReplyDeleteI have an issue in selecting the modelwindow.
i have selenium.click("//input[@value='Associate']"); button which will open the model window. After the model window is opened selenium will break down as it is unable to select the window based on its title and pass the further entry in to the window.
I have tried your modified selenium server.jar. But no luck. Any suggestion would be greatly help ful.
Thanks in advance
sorry i forgot to mention that i am using firefox browser.
ReplyDeleteThe work around is just for IE browsers.
ReplyDeletewonderful issues altogether, you simply won a new reader.
ReplyDeleteWhat might you recommend in regards to your publish that you
made a few days ago? Any positive?
Also visit my page ... gas water heaters Fourways
Every weekend i used to visit this web page, as i wish for enjoyment,
ReplyDeletesince this this web site conations truly good funny material
too.
Also visit my website :: corporate gifts South Africa
Excellent post! We will be linking to this great article on our website.
ReplyDeleteKeep up the great writing.
Also visit my site: cms website design Cape Town
Have you ever thought about creating an e-book or guest authoring on other blogs?
ReplyDeleteI have a blog based on the same subjects you discuss and would love to have you share some stories/information.
I know my visitors would appreciate your work. If you are even remotely interested, feel free
to send me an e mail.
my weblog :: click url
I'm amazed, I have to admit. Rarely do I encounter a blog that's equally educative and interesting, and
ReplyDeletewithout a doubt, you've hit the nail on the head. The problem is an issue that too few people are speaking intelligently about. I'm very happy I found this during my search
for something relating to this.
my page; Visit website
An intriguing discussion is definitely worth comment.
ReplyDeleteThere's no doubt that that you ought to publish more about this subject matter, it might not be a taboo subject but usually folks don't talk about such topics.
To the next! Cheers!!
Feel free to visit my site; click url
You should take part in a contest for one of the best sites on
ReplyDeletethe internet. I'm going to recommend this web site!
Feel free to surf to my weblog ... website
This design is incredible! You most certainly know how to keep a reader entertained.
ReplyDeleteBetween your wit and your videos, I was
almost moved to start my own blog (well, almost...HaHa!
) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented it.
Too cool!
Also visit my site - More info
I could not resist commenting. Well written!
ReplyDeletemy web site: Infromtion site
Excellent web site you have got here.. It's difficult to find excellent writing like yours these days. I honestly appreciate people like you! Take care!!
ReplyDeletemy web site; click here
Hey there I am so glad I found your site, I really found you by error, while I was looking on
ReplyDeleteGoogle for something else, Anyways I am here now and would just
like to say thanks a lot for a incredible post and
a all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the
moment but I have bookmarked it and also added your RSS feeds,
so when I have time I will be back to read much more, Please do keep up the superb jo.
Take a look at my webpage; website link
Nice response in return of this question with real arguments and explaining everything concerning that.
ReplyDeleteFeel free to visit my blog post ... website link
Howdy! This post couldn't be written any better! Reading through this post reminds me of my old room mate! He always kept chatting about this. I will forward this post to him. Fairly certain he will have a good read. Thanks for sharing!
ReplyDeleteFeel free to visit my site ... financial advisory services
Hi there, just wanted to tell you, I liked this article.
ReplyDeleteIt was funny. Keep on posting!
Here is my website - web site designer
Right here is the right blog for anybody who hopes to find out about this topic.
ReplyDeleteYou understand so much its almost hard to argue with you (not that I personally would want to…HaHa).
You certainly put a fresh spin on a subject which
has been discussed for many years. Wonderful stuff, just excellent!
Also visit my web page Visit here
Thanks for sharing this information.It was very nice blog to learn about Selenium
ReplyDeleteThe blog is very engaging and informative.
ReplyDeleteDigital marketing courses in Noida
BEST EVER IN THE WORLD. YOU MUST TRY THIS !
ReplyDeleteAMAZING WORK GUYS JUST KEEP IT UP !
SITE IS HERE : https://www.apollohealthdoc.com/services/pdo-threads
Thanks for sharing such a great information.. It really helpful to me..I always search to read the quality content and finally i found this in you post. keep it up!
ReplyDeleteDigital Marketing Course in Raipur
Enjoyed reading the article above , really explains everything in detail, the article is very interesting and effective. Thank you and good luck in the upcoming articles
ReplyDeleteBest Gynaecology Hospital in Bettiah
Your Blog is very nice.
ReplyDeleteWish to see this much more like this. Thanks for sharing your information!
Best Eye Hospital in Ambikapur
Elevate your digital marketing prowess with Delhi's top-rated courses. Delve into the nuances of online brand building, customer engagement, and ROI optimization under the guidance of industry leaders. Acquire the tools and insights necessary to excel in the competitive digital marketplace.
ReplyDeletevery interesting, good job and thanks for sharing such a good blog.
ReplyDeleteForensic Science Course in Raipur
I read this post your post so nice and very informative post thanks for sharing this postBest Hospital in Bettiah
ReplyDeleteThank you for the refreshing ideas on commenting
ReplyDeleteDigital Marketing Course Fees in Raipur
Great website, thanks for sharing
ReplyDelete3 BHK Apartment in Vidhan Sabha Road, Raipur
"This post was incredibly insightful! Your detailed explanation on the topic has cleared up a lot of confusion for me. Thank you for sharing your expertise and making complex concepts easy to understand. Looking forward to more informative articles from you!"
ReplyDeleteModular Kitchen & Wardrobe in Raipur
"Thank you for such a comprehensive and detailed article. I learned a lot!"
ReplyDeleteModular Kitchen and Wardrobe in Raipur
Thanks for sharing your thoughts and ideas on this one. Please keep posting about such articles as they really spread useful information. Best Digital Marketing Course In Noida
ReplyDelete