I'm using WatiN automation tool. I've a popup window in which i need to enter values in somefields and click on submit button upon which the value is inserted in the main page. I'm able to insert the value into tht fields and click on the submit button but, after this the execution stops and i get the error "Timeout while Internet Explorer busy". so please help me to handle this.
thankingyou
You might try using:
button.ClickNoWait()
rather than:
button.Click()
This worked perfect for me: Disable Protected Mode (in the Internet Security Proprties, un-check the "Enable Protected Mode" checkbox right under the security level slider. I'm using IE7, and I reproduced the issue once I switched the Protected mode back on.
Have a read of this blogpost I wrote, http://www.teknologika.com/blog/modal-dialogs-and-dropdowns-in-watin/.
It explains about modal popups in a lot of detail
Related
I'm looking for a way to programmatically click the drop-down arrow that appears when we open a specific FB post such as https://www.facebook.com/userxxx/posts/10155300116786742
Can anyone please provide me the code for Visual Basic? Thank you.
Drop-down arrow
in your webbrowser control you can invoke javascript code inside of the requested page by using
WebBrowser.Document.InvokeScript("eval", "some javascrtip here")
that leaves us with the problem of doing the dropdown click with javascript. That you can do with:
document.querySelectorAll("[data-testid=post_chevron_button]")[0].click()
so, all together it end up being
Dim micode As Object() = {"document.querySelectorAll('[data-testid=post_chevron_button]')[0].click()
"}
WebBrowser.Document.InvokeScript("eval", micode)
notice the js code provided might change. You should decide what code is better yourself. I recommend open facebook or any page, in chrome and press F12 ... that is the developer console. You can run and debug javascript there.... have fun!
As a user I have to checkmark many checkboxes in a webpage frequently. so I just want to make checkbox by default checked when ever page loads. Is there any settings we can do chrome. or any injector with the help of extension.
Appreciate your help.
There is an extension called Check All. It works pretty well:
Here is the link for that : https://chrome.google.com/webstore/detail/check-all/nnbihdpkeohjdfncchjhidbbonnihaob?hl=en
i have a very simple firefox addon that essentially just displays the total number of open tabs.
So far it works beautifully, however after right clicking on the toolbar and selecting Customize… it only shows the default text until a tab is opened or closed.
i presume that i need to add an event listener for this event and call updateWidget(), however i can't find it in the API doc. So does anyone know how to do it?
Verified as bug, see : bugzilla.mozilla.org/show_bug.cgi?id=773297
I am doing some web automation using Selenium RC. Am new to Selenium RC and am facing problems (may be learning curve) while doing automation. I am using java with Eclipse IDE to code selenium RC.
Scenario: I have a screen with a link. while clicking, it will open a lookup window which contains lot of names (grid). Now I have to select a value from grid by directly clicking any row/record. Or I can use search option and select the record. The problems are
my recorded script is NOT responding to pop-up windows.
Is there any command for "double-click" in selenium.
#rs79 - It didn't work for me. Here is my code:
selenium.click("link=eName"); //click the link to open the lookup window
//lookup window
selenium.focus("Associate"); <br>
selenium.waitForPopUp("Associat", "20000");
selenium.selectWindow("Associat");
selenium.type("id=SearchTextBox", "xyz"); //Enter the text in search field of lookup
selenium.click("id=SearchButton"); // click search button on lookup window <br>
Please correct me if I am wrong. Appreciated if anyone give me more suggestions.
Without access to your DOM, I would recommend recording using the IDE, and adapting the right context from the recorded actions into RC. The IDE does a decent job of capturing the context for popups and modals.
After the capture, here are some gotchas:
For iFrames, change the captured frame id to a more generic (css) locator
Be wary about the difference between selectWindow() and selectFrame()
If its a popup not an popup window then you can try the firebug to locate the element or record you want.
Now copy its xpath and use it in your code.
Same problem I have faced and solved by this method as xpath from fire bug is detailed and locates the proper window.
After coping xpath please verify the path has // at starting.
Thanks
This will help to handle salesforce lookups
Iterator it = windows.iterator();
String parentwindow =(String) it.next();
String childWindow =(String) it.next();
// Switch to parent window
driver.switchTo().window(childWindow);
MiscUtils.pauseForElementToBePresent(3000L);
driver.switchTo().frame("your frame NAME/ID");
MiscUtils.pauseForElementToBePresent(3000L);
// your step to perform on child page.
driver.findElement(By.linkText("123Test")).click();
MiscUtils.pauseForElementToBePresent(3000L);
//if popup is getting close automatically switch to parent window otherwise use "driver.quit();" to close popup
driver.switchTo().window(parentwindow);
driver.switchTo().defaultContent();
I'm working with the WatiN tool. I've a scenario where i need to check a checkbox and click on an ok button in a popup window. i've used AttachtoIE method and used the URL attribute to attach to the popup window. Now the problem is that the URL contains an ID attribute, and its value changes each time the popup appears.. how can I handle this or is there any other method other than AttachtoIE? please give some suggestions.
Thank you.
You can use Find.ByUrl(neww regex("some regexe expression")) to ignore the id part. Or if you are sure that you have just one IE instance open before the popup is opened, attach to to the IE instance which has not the same URL as the browser you opened the popup from.
HTH,
Jeroen