Hi Vincent,
Vincent Massol wrote:
> On Feb 2, 2009, at 12:56 PM, mflorea (SVN) wrote:
>
>> Author: mflorea
>> Date: 2009-02-02 12:56:41 +0100 (Mon, 02 Feb 2009)
>> New Revision: 16027
>>
>> Modified:
>> enterprise/trunk/distribution-test/wysiwyg-tests/src/test/it/com/
>> xpn/xwiki/it/selenium/StandardFeaturesTest.java
>> Log:
>> XWIKI-3053: When a HR is inserted at the beginning of a paragraph an
>> extra empty paragraph is generated before that HR
>>
>>
>> Modified: enterprise/trunk/distribution-test/wysiwyg-tests/src/test/
>> it/com/xpn/xwiki/it/selenium/StandardFeaturesTest.java
>> ===================================================================
>> --- enterprise/trunk/distribution-test/wysiwyg-tests/src/test/it/com/
>> xpn/xwiki/it/selenium/StandardFeaturesTest.java 2009-02-02 11:52:59
>> UTC (rev 16026)
>> +++ enterprise/trunk/distribution-test/wysiwyg-tests/src/test/it/com/
>> xpn/xwiki/it/selenium/StandardFeaturesTest.java 2009-02-02 11:56:41
>> UTC (rev 16027)
>> @@ -613,4 +613,35 @@
>> switchToWikiEditor();
>> assertEquals("before\n\n|=Space|=Page\n|Main|WebHome\n
>> \nafter", getFieldValue("content"));
>> }
>> +
>> + /**
>> + * @see XWIKI-3053: When a HR is inserted at the beginning of a
>> paragraph an extra empty paragraph is generated
>> + * before that HR
>> + */
>> + public void testInsertHRInsideParagraph()
>> + {
>> + typeText("xy");
>> + applyStyleParagraph();
>> +
>> + // Insert HR at the end of the paragraph.
>> + clickHRButton();
>> +
>> + // More the caret between x and y.
>> + runScript("var range = XWE.selection.getRangeAt(0);\n" +
>> "range.setStart(XWE.body.firstChild.firstChild, 1);\n"
>> + + "range.collapse(true);");
>
> Is there a way move to this to a DSL method for moving the caret?
Since we cannot have references to JavaScript DOM nodes in Selenium Java
code, we have to use string locators to identify them. So the DSL method
would have the following signature:
void moveCaret(String containerJSLocator, int offset);
and a call would be like:
moveCaret("XWE.body.firstChild.firstChild", 1);
Thanks,
Marius
[snip]
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs