e.g.:
payto("tb1q39wfaaddressaddressaddressz4e42u0e47",0.001,feerate="0.1")Then,
signtransaction("raw_transaction_result_of_the above")I don't know what Electrum version you use. But on 4.8.2 that i just downloaded, running
payto on GUI's console also show password pop-up and return signed TX. So second step isn't needed, although i suggest people to preview the signed TX on GUI using "Tools" -> "Load transaction" -> "From text" -> copy hex string -> "Load transaction" button.
Oh, right.
I have used a no-password testnet4 wallet for that test so I missed the password prompt.
No wonder it outputs an already finalized serialized raw transaction instead of PSBT.