getgauge / taiko

A node.js library for testing modern web applications
https://taiko.dev
MIT License
3.56k stars 452 forks source link

More APIs should include name parameter #2691

Open DmonUnl opened 1 year ago

DmonUnl commented 1 year ago

Current documentation shows you can add named tabs via SwitchTo and OpenTab but same is not included for: CloseTab Reload GoTo (I.e for when you already have an existing tab open but want to give it a name)

Right now you can add names for tabs you are about to open, and switch between existing tabs with names but there should also be logic to close existing tabs or to name existing tabs with no name, or to identify and switch to tabs with no name e.g that have {name:null}

similarly, the name parameter can be applied on browser level with: OpenBrowser CloseBrowser OpenIncognitoWindow CloseIncognitoWindow

example: openBrowser() openTab(‘google.com’,{name:”hi”}) closeTab({name:”hi”})

will throw error “No tab(s) matching [object Object] found