我试图让我的程序使用 for 循环将字符串写入文本框中,但我似乎无法做到。我试着用函数和不用函数来做,我调试了它,但仍然找不到问题HTML:<textarea class="challengeTextArea" rows="4"></textarea>我试过的(蟒蛇):challange = "Dear, dear! How queer it seems, Alice said to herself, Which way? Which way?, holding her hand in hand with Dinah, and saying Come up again, dear! I shall"text_box = driver.find_element_by_xpath("//textarea[@class='challengeTextArea']")for letter in challange: print(letter) text_box.send_keys(letter)print("IM HERE")我希望它写入文本文件,但是当我在 for 循环中打印字母时,它只打印第一个字母,它甚至不写。如果您找不到问题,请告诉我,我将从我的代码中提供更多部分。
添加回答
举报
0/150
提交
取消