Skip to content
This repository has been archived by the owner. It is now read-only.

Unable to type in richtext enabled iframe with SafariDriver #4467

Closed
lukeis opened this issue Mar 4, 2016 · 12 comments
Closed

Unable to type in richtext enabled iframe with SafariDriver #4467

lukeis opened this issue Mar 4, 2016 · 12 comments

Comments

@lukeis
Copy link
Member

@lukeis lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 4467

I am trying to click on iframe element and trying to send keys inside the iframe element.
The Code is executed successfully but on UI nothing occurs.

What steps will reproduce the problem?
List<WebElement> total_frames = driver.findElements(By.tagName(iframe));

for (WebElement options_frame : total_frames) {
String str_class = options_frame.getAttribute(firstAttrib);
String str_title = options_frame.getAttribute(second_Attrib);

    if (str_class == null)
    str_class = "";
    else if (str_class.equals(firstAttrib_value)) {
    if (str_title.equals(secondAttrib_value)) {
        options_frame.click();
    options_frame.sendKeys(textToSend);

firstattrib and second attrib specify the attribute name and firstattrib_value and
secondattrib_value specify the attribute value.
keystosend is the text you want to send.

Actual Result:-
Nothin happens on executing this code.

Expected result:-
USer should be able to type text inside iframe element and click also.



Selenium version:2.25.0
OS:Any
Browser:Safari
Browser version:5.1.7

Reproducible on MAc also.

Reported by mahajansahil12 on 2012-08-27 11:44:29

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Are you trying to type in a contentEditable frame (e.g. a richtext editor)?  Could you
provide a reduced test case (with HTML and CSS)?

Reported by jmleyba on 2012-08-27 16:11:40

  • Status changed: NeedsClarification
  • Labels added: Component-WebDriver, Browser-Safari
  • Labels removed: Status-Untriaged
@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Hi,

MY Browser HTML for the iframe part is following:-

<iframe class="abc" title="generic" style="height:100%;width:100%;">
<#document>
<html>
  <head></head>
    <body></body>
</html>
</iframe>

In this it doesnot contain contentEditable flag, i am able to click inside iframe element
as well as type inside the iframe element on Firefox, IS and Chrome but it doesnot
work on Safari and IPhone Driver.

It is hampering my Testing a lot, Please fix this issue on priority.

Reported by mahajansahil12 on 2012-08-28 05:36:39

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

<iframe class="gwt-RichTextArea" title="generic" style="height:100%;width:100%;">
More precisely my iframe class contains the above mentioned gwt-RichTextArea

Reported by mahajansahil12 on 2012-08-28 05:38:36

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Sorry, but this is not possible with the SafariDriver.  All user actions are simulated
through JS.  With a richtext enabled document, the browser will not update the DOM
in response to a synthetic key event.

Reported by jmleyba on 2012-08-28 17:28:55

  • Status changed: NotFeasible
@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

But it works fine on Chrome, IE and Firefox with their respective drivers. So, why is
it that it will not work with SafariDriver? Is this issue specific to Safari?

Reported by mahajansahil12 on 2012-08-29 07:26:23

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

This limitation is specific to the SafariDriver's implementation.

Reported by jmleyba on 2012-08-30 19:49:23

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Hi,

Can we expect this bug to be fixed in the coming release as it is must for our application
as for rich text editor it will always fail.

The severity and priority of this defect is very high or i should say it as SHOWSTOPPER.

Please fix this issue..as the impact of this bug is also on iPHONE Driver.

Reported by mahajansahil12 on 2012-08-31 05:50:02

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

or you can suggest the way in which we can do this thing???

Reported by mahajansahil12 on 2012-08-31 05:50:30

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

I closed this bug as NotFeasible because it cannot be fixed.   It is a technical limitation
for how the SafariDriver is implemented.  To work around it, we'd have to call out
to a NPAPI plugin to generate native events - but you can't load a NPAPI plugin from
an extension.

Sorry to be the bearer of bad news, but you will not be able to test richtext functionality
with the SafariDriver.

Reported by jmleyba on 2012-08-31 14:50:33

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Anyone has any alternative solution for this issue?

Reported by pavithz on 2013-01-14 05:26:42

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Issue 5353 has been merged into this issue.

Reported by jmleyba on 2013-03-18 17:37:47

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:16:02

  • Labels added: Restrict-AddIssueComment-Commit
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.