Open a link in new tab using Selenium IDE - selenium

I have looked at many answers
Selenium IDE:Opening in new tab and shift focus to new tab not working
How to open link in new tab etc....
posted regarding this question but not even a single one is 100% relevant therefore, I am asking this again.
I need to open three different links:
google.com
yahoo.com
microsoft.com
in three different tabs but under same window and I am using selenium IDE, I know, it is easier using WebDriver but unfortunately I am using IDE. If I use Open it just opens the next link in the same tab and when I use OpenWindow or openWindowAndWait, it just opens the new window which I do not want.
Can someone please help..

There's no command within Selenium IDE which directly relates to Tabs, Selenium IDE is just not built to work with them. There's a post fro ma few years ago which references an answer from a selenium dev stating this (Selenium IDE for Firefox Ctrl-Tab)
The only way to potentially get it working would be to use send Keys to simulate Ctrl+T to open a new tab. There's a post here which gives details on it.

Related

Selenium IDE Version 3.17.0 how to catch new window handle

I'm looking for a way to open a new window and have control over it so i can continue testing it. The select window command requires the handle of the new window but I have not yet found how to retrieve this handle. Please do not answer me if you have not personally tried the solution you want to propose with version 3.17.0 or later of Selenium IDE.
I spent many hours looking for a solution that works with the Selenium IDE in version 3.17.0 or higher. I am not looking for a solution that makes use of java code or other language, i am looking for a solution that can be used in the Selenium IDE plugin, especially for the Firefox browser. The web is full of examples and tutorials but none working with version 3.17.0 o superior.
This is an example (not working because win_ser_1 is not good) of what i'm trying to achieve:
Thanks for any help
For the example you give I don't have an exact answer since you open a new window with JS.
But if you for instance have link that opens a new window there is options in SeleniumIDE to store the new window handle.
I'll show an example. I have a button that triggers a new window to pop up.
Here is how to store the handle:
Be sure to check the checkbox:
here is how I use it in the script:

Reuse existing firefox instance with selenium and capybara

currently during debug of test cases selenium is opening a new firefox window, in whatever desktop screen it chooses. I want to be able to have selenium attach to the existing window (and not close the window when the test is over.)
I see this in the selenium documentation
webdriver.firefox.useExisting Never use in production Use a running instance of firefox if one is present
but I do not see how to set it from rails/rspec/capybara
I have looked at the related SO answers, and they are more to do with attaching to a running test. I just want to control where the window is, and be able have the window open with the developer console, so we can see what is going on, and finally have the window stay open at the end of the test
Depends on the issue 2163 it was a feature of Selenium 1 and not implemented to Selenium 2 but still stays in documentation. Check this issue.

How to record test cases with robotframework?

I recently started using robotframework with the Selenium2Library. I haven't tested using Selenium before, but I know it is possible to record tests using Selenium. In RobotFramework, it says, "it is not possible". I mean even for a simple login test, I need to write the test, specifying the id of username, password and submit button.
However, is there any way by which these tests can be recorded using robotframework? such as clicking on a text box, entering a string and then clicking on submit button etc., and automatically generate the test case source code instead of having me to write the test cases. Is this possible with robotframework or any external library that it supports?
robotframework wasn't designed to be a record-and-play tool, and has nothing built-in to support that.
There was someone who wrote a selenium IDE plugin that would generate robot keywords, but that was years ago. The github repository is here: https://github.com/denschu/selenium-ide-format-robotframework
The code hasn't been touched since 2012, so I doubt it's of much use.
Using this Firefox add-on, FireRobot we can generate most of the code and also using this you can select the elements on the screen and get related code suggestions on right click like
Wait Until Element Is Visible
Click Element
and all operations to perform on the selected element.

How do I open a new private window in Selenium IDE and switch between windows?

I'm trying to make automated tests for a site, using Selenium IDE (not Selenium Server, RC, 2.0, and WebDriver).
I want to be logged in with user 1 in Firefox window 1 and open a Firefox private window to sign in with user 2. I need this because the website I want to test doesn't allow multiple users signed in in the same browser at the same time.
So:
1) Is there a way to open a private/incognito window?
2) How do I then switch back to the main window?
Here's how switching between simple windows looks like:
http://i.stack.imgur.com/P5bbt.png
In the attached image you can see how I solved the problem:
It works fine with Firefox version 42.0 (and earlier versions). With Firefox 43 I have some problems because "openWindow screen2" does not overwrite my window I open with javascript but opens an own window. I'm looking for a solution for this issue.
As far as I'm aware this isn't something that Selenium IDE can do. The best solution I can think of would be to use something like Autohotkey and combine the it with Selenium.
With AHK you can set a script to mimic the keyboard command to open a private window (ctrl+shift+p). When I've used it with selenium in the past I've set the AHK script to start when it detects a certain window title, and then had selenium call a javascript function from the user-extensions to amend the title of the page you're on to the title which will trigger the function when you need the AHK script to run. (Best not to use the default one, otherwise you could end up with countless private windows if it hits that page multiple times).
Try this,
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("browser.private.browsing.autostart",true);

Selenium IDE unable to open new windows from link when running through testcase

So I'm writing tests for a web page, and one of the tests include clicking a link, which opens a new window, do some assertions in that window, and jump back.
To open links I'm using the technique described here.
The weird thing is, when I go through the steps manually (just press all of them one after another) it works fine. But when I try to run the whole test, it either does nothing (no windows open) or it clicks another button (and not the link).
What can be the reason for it working when i do the steps manually, and not when Selenium IDE runs them for me?
To open link, you can use
click | link=link name
selectWindow | windowname
And then perform operation on that window