I am using Selenium and Java to write a test for Chrome browser. I noticed that
action.sendKeys(Keys.CONTROL+ "j").build().perform();
action.keyUp(Keys.CONTROL).build().perform();
does not open download page on Chrome but works on Firefox.
why doesn't it work? and what would work on chrome too?
Follow this steps.
a) Press Ctrl-Shift-J (this will launch the chrome://inspector... window)
b) Change focus back on the PeopleSoft Page and then press Ctrl-Shift-J again. This will give the PeopleSoft page info.
If not according to knowledge cannot be customized keyboard shortcuts on chrome.
Try this ->
Open a new Tab and enter URL -> chrome://downloads/
This should solve your problem
Related
enter image description hereHi,Iam new to selenium and java testing. Iam trying to right click on google.com about link and open the link in new window. Up to right click my code works fine. When I send down-arrow nothing happens in the browser. Can anyone tell what's wrong with the code. I have tried it in all different browsers.
My problem is when I click on a desktop icon, it opens a link in already opened chrome browser in a new tab. How do I attach with the already opened browser and not a new one?
The below code returns a null because there is no window opened through selenium ofcourse, so yeah.
Set<String> windows = webdriver.getWindowHandles();
System.out.println(windows);
Any suggestions would be of great help. Thanks In advance.
There is no way to attach the chrome window that you've opened from the desktop application to your WebDriver instance.
If you want to be able to control a web page with a Selenium - you must pass your URL to a driver like that:
webdriver.get("https://www.your_link.com");
You might think about the way of getting and storing your URL as a variable and passing it into your code.
That would also be helpful if you add a bit more details about the problem. It's a bit unclear at what stage of the test you open the web page with a desktop application. Selenium can't be used to test desktop applications. Code sample of the test from your project would also help.
Security Warning Window
This image pops up when I click on "Continue to this website (not recommended)."
Please Try This, It works.
public void TestSSLerror() {
//Download IEDriver exe and past in project
driver = new FirefoxDriver();
//Open WebSite for time being let's take http://test.com
driver.get("https://test.com");
//now we are going to use javascipt ,This will click on "Continue to this website (not recommended)" text and will
//push us to the page
driver.navigate().to("javascript:document.getElementById('overridelink').click()");
}
It is better if you can disable the security check by bypassing using required credentials, if it is not related to the test(saves time), otherwise you need to go for a third party tool like auto-it to automate it.
I am running a page that launches a Java Webstart app and a Java Applet. I don't have problem launching this page in Firefox, but I have to run it in IE11. The thing is IE11 keep redirecting me to oracle java download site. I have install Java RE like 3 times from IE already. What am I missing?
This is the site i am having problem with: http://qa4.kiosk.ieventstest.com/
I got same issue on Jira when I was trying to attached an image. You can follow steps below:
Open IE >> Internet Options >> Security tab >> "Local Intranet"
Click on "Sites" button and UNcheck the checkbox "Auto detect intranet network" and CHECK all other 3 checkboxes underneath
Click "Advanced" button, and "Add" this website to the zone (if there is something on text box)
GOOD LUCK! :)
When we use Desktop.browse method to open a url in Internet Explorer, then it overrides the current web page in the browser. Hence if user was doing anything critical in current page in browser, then its all lost.
This does not happen in IE8 and firefox. But the problem is there in IE6.
Has anybody found a fix for this problem in IE6.
Change the settings in IE to open a new window.
As you pointed out the settings is available in
Tools->Internet Options->Advanced->Reuse Windows for shortcuts