async function renameItem (client, type, oldName, newName) {
  await client.rightClick(`.session-current .file-list.${type} .sftp-item[title="${oldName}"]`, 10, 10)
  await delay(500)
  await client.click('.ant-dropdown:not(.ant-dropdown-hidden) .ant-dropdown-menu-item:has-text("Rename")')
  await delay(400)
  await client.setValue('.session-current .sftp-item input', newName)
  await client.click('.session-current .sftp-title-wrap')
  await delay(2500)
}
Renames an item using the context menu

@param {Object} client - The Playwright client
@param {string} type - The type of file list ('local' or 'remote')
@param {string} oldName - The current name of the item
@param {string} newName - The new name for the item