I have a function that verifies the data copied to clipboard
def verify_copied_transcript_data(self):
selector = '//input[@type="text" and @name="topic"]'
topic_field = self.wait_for_element_by_xpath(selector)
topic_field.clear()
topic_field.send_keys('')
topic_field.send_keys(Keys.COMMAND, 'v')
topic_field_value = topic_field.get_attribute('value')
self.assertTrue(len(topic_field_value) > 0)
I have verified that manually CMD + v does paste the copied text on the topic_field. Any idea why selenium would not simulate topic_field.send_keys(Keys.COMMAND, 'v')
The function to copy the text is:
def click_copy_transcript(self):
selector = '//div[@id="closeChatModal"]//span[contains(text(), "Copy All")]'
self.wait_for_element_by_xpath(selector).click()
This copies the text on clipboard