How can I record ""right-click"" new-tab?

Just to add another solution: One can also use XClick | locator | #right to right-click and open the context menu, and then select “Open in new tab” from the context menu with the keystrokes “Down, Enter” via XType.

{
  "CreationDate": "2018-10-29",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.cecb.ch/Pages/GEAK/Contact/ExpertSearchPage.aspx?ln=fr",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "//*[@id=\"_cphMasterContent__cphPageContent__searchControl__searchResults__searchResultsGridView_DXDataRow1\"]/td[9]/a/img",
      "Value": "#right"
    },
    {
      "Command": "XType",
      "Target": "${KEY_DOWN}${KEY_ENTER}",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": ""
    },
    {
      "Command": "selectWindow",
      "Target": "tab=1",
      "Value": ""
    }
  ]
}
2 Likes