Could you please let me know how GuiXT is used with transaction variants?

You can indeed create a GuiXT script together with a transaction variant. In this case, the GuiXT script is stored in SAP database. You need a valid RFC user / password in GuiXT profile so that GuiXT can download the scripts when a transaction variant is active.