Use code to do WETH/UNI swap on Uniswap V3. Test on Ropsten network. This project will be a good start to learn trading bot.
First you need to get some fake ether on Ropsten faucet. Next, go to uniswap to swap some WETH. Regarding STF error - it may be useful to notice that both ETH (to pay gas prices) and WETH tokens (to swap to UNI) must be available on the user's account - otherwise, the user will get STF - even after calling for approval.
This project borrow a lot from this video Swap tokens on Uniswap V3