I want to click on flash button which should open a new tab and in turn I need to do some operations on that page and return to the main page. Can anyone help with the code in Java? I have seen that flash doesn't work on Selenium, if so what are the alternatives?
I never tried, but i found this link, http://www.adobe.com/devnet/flash/articles/flash_selenium.html, maybe is useful for you. Is a plugin to use selenium in Flash front end
Related
In chrome we have Webrtc-Internals page I am trying to automate this website but I have a problem in doing it when you click on "Create Dump" dropdown we have two checkbox's
and
I am trying to click this element using "--headless" chrome without headless if you click it opens "save as" dialog box which cannot be automated using selenium cause it os-dialog box but when it comes to headless by click nothing popups and check box is not enabling no exceptions was shown, If you have an idea to automates this it would be helpful,
Sample code (Java) :
driver.get("chrome://webrtc-internals/");
driver.findElement(By.xpath("/html/body/p/details/summary")).click();
driver.findElement(By.xpath("//*[#id='content-root']/details/div/p[5]/label/input")).click();
driver.findElement(By.xpath("//*[#id='content-root']/details/div/p[1]/label/input")).click();
Thanks on advance!
Tried sendKeys also not working,
In a case it enables but can't save recording, Tried different type of chrome version
When we use JAWs for accessibility purpose we find an issue with Tab button. It's work correct for IE browser, but wrong for Edge. When SWT Edge browser widget display and we use Tab button JAWs pronounce wrong Link/Button label, (it repeat the previous one, but if we click Enter right link will open).The issue is random, sometimes it's work correct but sometimes simply repeat the previous Link title/label. It's work ok if I use U button but wrong for Tab. I've tested browser's part locally running it at Edge browser and found that Tab button work correct with JAWs. But when I run application as a part of Eclipse RCP application with SWT Edge browser I found an error. It seems like we have some conflict/problem between SWT Edge and Jaws. May be some one understand the problem and can help with it? Thank you
i'm new to selenium so i don't know weather to ask this question or not please correct me if im wrong ..
i have a site where clicking a button opens the link in a new tab i have succefull used the selenium windowhandle and done the work on the new open tab but when switching to the parent tab i have a problem that is the code is being executed in that parent tab but the tab is not being focused so i can't see how my code is being executed in parent window for that i know to press Crlt +1 using java robot but is there any other way of haveing the focus back to my parent window so that i can see what is happening...
Thanks in Advance
This is what I use:
webDriver.switchTo().window(webDriver.getWindowHandles().toArray()[0])
To bring the window to front of all the windows I think you can try this.
webdriver .manage().window().maximize();
I want to navigate between menu tabs and display content without using any java script and j query .
because, when java script disabled from the browser its does not work.
I have attached image for menu tab.
can anybody help
Thanks
Sanjeev
See my answer here: Is it possible to have tabs without javascript
Yes, it's possible, but it won't work everywhere (yet!)
If you aren't going to use javascript, then you are pretty much stuck having each tab be a link that refreshes the whole page, with the new tab marked somehow as active and its content included.
I need to manipulate Popups & Download Dialogs of IE browser using either Java or
Javascript based automated solution.
I tried with selenium2 but its not working properly so any other suggestion for the same.
Actually selenium2 does not provide proper handling of alert/download dialogs so
I am thinking to use some other javascript/java solution.
With Download Dialog: I need to save the downloaded file to particular location.
With Alerts Dialogs: I need to check the displayed message and click on the particular button.
Any suggestion is appreciated.
Thanks.
I use selenium 1 and it works well to handle popups in my application.
//Click on browse file button, open a popup
selenium.click("//input[#value='Browse...']");
//waiting for popup to load
selenium.waitForPopUp("_Dialog", "30000");
//selecting the popup by passing window name
selenium.selectWindow("name=_Dialog");
//click a link inside pop up window
selenium.click("link=something");
//Put other popup operations here
//click cancel button for pop up
selenium.click("cancel");
//back to main window
selenium.selectwindow("null")
To get the message from alert boxes, use selenium.getAlert();. This will return the message contained in the alert box as String.
Also, sometime you will need to check, whether alert has occurred before switching to it.
int noofWindows = selenium.getAllWindowNames().length;
if (noofWindows > 1){
//selects the second window
selenium.selectWindow(selenium.getAllWindowIds()[2]);
//Prints the message in the alert window
System.out.println(selenium.getAlert());
}
If it is not a necessity to run test in IE, use firefox(*chrome) and close all other windows before executing the code.
I hope this helps you.
*All the mentioned code is for handling JavaScript pop-ups. I'm not sure whether this will work for Vb-script or not.
EDIT
I think IE download pop up is a windows event so cannot be handled by selenium directly, for this you'll have to use Java AWT or AutoIT.
AutoIT script should be something similiar to
WinWaitActive(windowTitle)
ControlClick(windowTitle,"",buttonName)
and save it as IEsave.exe. NOTE: I'haven't tried this AutoIT script.
now you have execute IEsave.exe from your program. I'm using java here.
java.lang.Runtime.getRuntime().exec("c:/IEsave.exe");
This will execute the file which in-turn will handle the save button event for windows.
You can create similar exe files for handling other window's events.
Hope this solves your problem.