0

Selenium IDE : I am trying to open a link in new tab using controlkey or contextmenu and both commands did not work.
USING CONTROLKEY : 1). verify element present 2)controlkeydown() 3) click link 4) controlkeyup(). when executed, it displays the error unknown command (control key().

USING CONETXTMENU : 1 ) Verify element present 2) contextmenu target link=linkname 3) click target = link

JacekM
  • 4,041
  • 1
  • 27
  • 34
user2689342
  • 1
  • 1
  • 1

2 Answers2

2

How about extracting href attribute from link and using it to open a new window with separate command?

|storeAttribute | SOME_LOCATOR@href | mylink |

|openWindow | ${mylink} | |

EDIT: more specific example

|open | http://twitter.com | |

|storeAttribute | link=About@href | mylink |

|openWindow | ${mylink} | |

This opens Twitter's About page in new window.

JacekM
  • 4,041
  • 1
  • 27
  • 34
  • Can you please ell me how to uset n selenium .. What to give in command and target value? openingwindow asks for a javaId of the window ? – user2689342 Aug 18 '13 at 12:47
  • [warn] Opening window '_blank', which is not a real window name. Randomizing target to be: selenium_blank60950[error] Unexpected Exception: TypeError: result is null. fileName -> chrome://selenium-ide/content/recorder.js, lineNumber -> 74, columnNumber -> 0. error is displayed using the above command – user2689342 Aug 18 '13 at 12:52
  • I've edited my post with more specific example. As for the error - it seems that Firefox blocks windows (pop-up blocker) that are being open with openWindow command. You need to allow FF for opening pop-ups from your domain. – JacekM Aug 18 '13 at 20:45
1

My advise to you will be to not test this. Both of the items you are trying to test are features of the browser itself and not of the web application. So if your aim is to test the web application, you are not adding any value by testing the browser.