Closed wangjingyu001 closed 2 years ago
Here is the cdp doc: https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent
PS: it only dispath the keyboard events but not the physical Keyboard
.
await tab.keyboard_send(string='\r')
could send Enter by the way.
first ,I used tab.js('zl_tz(8906)') .It's a function that button calls. And ,I use '\r',It's easier. And one more question. How to deal with alert window. I used tab.historyback(). But sometimes it doesn't work well. So is there something that likes selenium switch to alert. THANKS.
Do you mean tab.handle_dialog
?