seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.46k stars 910 forks source link

Emojis and return lines not being processed properly by self.type #2663

Closed st7xxx closed 3 months ago

st7xxx commented 3 months ago

Hello, i am using self.type to type a message like this Testing emojis: ⭐❤️ Testing return: Return test and instead of returning the exact text it returns, every row being typed separately and no emojis being sent. I couldn't find anyone else having this issue

mdmintz commented 3 months ago

I'm not sure I really understand your issue without actual code.

This code types emojis successfully for me:

from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)

class DemoSiteTests(BaseCase):
    def test_demo_site(self):
        self.open("https://seleniumbase.io/demo_page")
        self.type("#myTextInput", "⭐❤️")
        self.type("textarea.area1", "⭐❤️\n")
        self.type('[name="preText2"]', "⭐❤️!")
        self.sleep(3)