Author: ppitonak(a)redhat.com
Date: 2009-10-29 07:22:08 -0400 (Thu, 29 Oct 2009)
New Revision: 15774
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/colorPicker/ColorPickerTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/comboBox/ComboBoxTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/SimpleEditorTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceInput/InplaceInputTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceSelect/InplaceSelectTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inputNumberSlider/InputNumberSliderTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/suggestionBox/SuggestionBoxTestCase.java
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/colorPicker/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/comboBox/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/editor/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/messages.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceSelect/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inputNumberSlider/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spinner/locators.properties
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/suggestionBox/locators.properties
Log:
* test cases for color picker, combo box, editor, inplace input, inplace select, input
number slider, and suggestion box refactored to use jQuery locators
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/colorPicker/ColorPickerTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/colorPicker/ColorPickerTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/colorPicker/ColorPickerTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -156,7 +156,7 @@
selenium.mouseDownAt(LOC_COLOR_AREA, "50,50");
selenium.click(LOC_APPLY_BUTTON);
waitFor(500);
-
+
String url = selenium.getAttribute(LOC_IMAGE + "@src");
Color imageColor = getPixelColor(url, 18, 97);
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/comboBox/ComboBoxTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/comboBox/ComboBoxTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/comboBox/ComboBoxTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -41,17 +41,14 @@
// locators
private final String LOC_FIRST_COMBO_INPUT = getLoc("FIRST_COMBO_INPUT");
private final String LOC_FIRST_COMBO_BUTTON =
getLoc("FIRST_COMBO_BUTTON");
- private final String LOC_FIRST_COMBO_CONCRETE_SUGGESTION =
getLoc("FIRST_COMBO_CONCRETE_SUGGESTION");
private final String LOC_FIRST_COMBO_SUGGESTIONS =
getLoc("FIRST_COMBO_SUGGESTIONS");
private final String LOC_SECOND_COMBO_INPUT =
getLoc("SECOND_COMBO_INPUT");
private final String LOC_SECOND_COMBO_BUTTON =
getLoc("SECOND_COMBO_BUTTON");
- private final String LOC_SECOND_COMBO_CONCRETE_SUGGESTION =
getLoc("SECOND_COMBO_CONCRETE_SUGGESTION");
private final String LOC_SECOND_COMBO_SUGGESTIONS =
getLoc("SECOND_COMBO_SUGGESTIONS");
private final String LOC_THIRD_COMBO_INPUT = getLoc("THIRD_COMBO_INPUT");
private final String LOC_THIRD_COMBO_BUTTON =
getLoc("THIRD_COMBO_BUTTON");
- private final String LOC_THIRD_COMBO_CONCRETE_SUGGESTION =
getLoc("THIRD_COMBO_CONCRETE_SUGGESTION");
private final String LOC_THIRD_COMBO_SUGGESTIONS =
getLoc("THIRD_COMBO_SUGGESTIONS");
// messages
@@ -106,20 +103,20 @@
scrollIntoView(LOC_FIRST_COMBO_BUTTON, true);
selenium.click(LOC_FIRST_COMBO_BUTTON);
- waitForElement(format(LOC_FIRST_COMBO_CONCRETE_SUGGESTION, 1));
- int count = selenium.getXpathCount(LOC_FIRST_COMBO_SUGGESTIONS).intValue();
+ waitForElement(format(LOC_FIRST_COMBO_SUGGESTIONS, 0));
+ int count = getJQueryCount(format(LOC_FIRST_COMBO_SUGGESTIONS,-1));
assertEquals(count, MSG_SUGGESTIONS_FIRST_COMBO_COUNT_1, "Number of
suggestions after after clicking on button.");
selenium.click(LOC_FIRST_COMBO_INPUT);
selenium.typeKeys(LOC_FIRST_COMBO_INPUT, "su");
selenium.typeKeys(LOC_FIRST_COMBO_INPUT, " ");
- count = selenium.getXpathCount(LOC_FIRST_COMBO_SUGGESTIONS).intValue();
+ count = getJQueryCount(format(LOC_FIRST_COMBO_SUGGESTIONS, -1));
assertEquals(count, MSG_SUGGESTIONS_FIRST_COMBO_COUNT_2, "Number of
suggestions after typing 'su'.");
String[] suggestions = new String[5];
for (int i = 0; i < 5; i++) {
- suggestions[i] = selenium.getText(format(LOC_FIRST_COMBO_CONCRETE_SUGGESTION,
i + 1));
+ suggestions[i] = selenium.getText(format(LOC_FIRST_COMBO_SUGGESTIONS, i));
}
String[] expected = new String[] { "suggestion 1", "suggestion
2", "suggestion 3", "suggestion 4", "suggestion 5", };
@@ -127,7 +124,7 @@
assertEqualsNoOrder(suggestions, expected, "Suggestions after typing
'sa'.");
try {
- selenium.clickAt(format(LOC_FIRST_COMBO_CONCRETE_SUGGESTION, 3),
"");
+ selenium.clickAt(format(LOC_FIRST_COMBO_SUGGESTIONS, 2), "");
} catch (Exception ex) {
// why the exception is thrown?
}
@@ -147,20 +144,20 @@
scrollIntoView(LOC_SECOND_COMBO_BUTTON, true);
selenium.click(LOC_SECOND_COMBO_BUTTON);
- waitForElement(format(LOC_SECOND_COMBO_CONCRETE_SUGGESTION, 1));
- int count = selenium.getXpathCount(LOC_SECOND_COMBO_SUGGESTIONS).intValue();
+ waitForElement(format(LOC_SECOND_COMBO_SUGGESTIONS, 0));
+ int count = getJQueryCount(format(LOC_SECOND_COMBO_SUGGESTIONS, -1));
assertEquals(count, MSG_SUGGESTIONS_SECOND_COMBO_COUNT_1, "Number of
suggestions after after clicking on button.");
selenium.click(LOC_SECOND_COMBO_INPUT);
selenium.typeKeys(LOC_SECOND_COMBO_INPUT, "sa");
selenium.typeKeys(LOC_SECOND_COMBO_INPUT, " ");
- count = selenium.getXpathCount(LOC_SECOND_COMBO_SUGGESTIONS).intValue();
+ count = getJQueryCount(format(LOC_SECOND_COMBO_SUGGESTIONS, -1));
assertEquals(count, MSG_SUGGESTIONS_SECOND_COMBO_COUNT_2, "Number of
suggestions after typing 'sa'.");
String[] suggestions = new String[4];
for (int i = 0; i < 4; i++) {
- suggestions[i] =
selenium.getText(format(LOC_SECOND_COMBO_CONCRETE_SUGGESTION, i + 1));
+ suggestions[i] = selenium.getText(format(LOC_SECOND_COMBO_SUGGESTIONS, i));
}
String[] expected = new String[] { "Sacramento", "Santa Fe",
"Salem", "Salt Lake City" };
@@ -168,7 +165,7 @@
assertEqualsNoOrder(suggestions, expected, "Suggestions after typing
'sa'.");
try {
- selenium.clickAt(format(LOC_SECOND_COMBO_CONCRETE_SUGGESTION, 3),
"");
+ selenium.clickAt(format(LOC_SECOND_COMBO_SUGGESTIONS, 2), "");
} catch (Exception ex) {
// why the exception is thrown?
}
@@ -188,20 +185,20 @@
public void testSuggestionsThirdComboBox() {
selenium.click(LOC_THIRD_COMBO_BUTTON);
- waitForElement(format(LOC_THIRD_COMBO_CONCRETE_SUGGESTION, 1));
- int count = selenium.getXpathCount(LOC_THIRD_COMBO_SUGGESTIONS).intValue();
+ waitForElement(format(LOC_THIRD_COMBO_SUGGESTIONS, 0));
+ int count = getJQueryCount(format(LOC_THIRD_COMBO_SUGGESTIONS, -1));
assertEquals(count, MSG_SUGGESTIONS_THIRD_COMBO_COUNT_1, "Number of
suggestions after after clicking on button.");
selenium.click(LOC_THIRD_COMBO_INPUT);
selenium.typeKeys(LOC_THIRD_COMBO_INPUT, "sa");
selenium.typeKeys(LOC_THIRD_COMBO_INPUT, " ");
- count = selenium.getXpathCount(LOC_THIRD_COMBO_SUGGESTIONS).intValue();
+ count = getJQueryCount(format(LOC_THIRD_COMBO_SUGGESTIONS, -1));
assertEquals(count, MSG_SUGGESTIONS_THIRD_COMBO_COUNT_2, "Number of
suggestions after typing 'sa'.");
String[] suggestions = new String[4];
for (int i = 0; i < 4; i++) {
- suggestions[i] = selenium.getText(format(LOC_THIRD_COMBO_CONCRETE_SUGGESTION,
i + 1));
+ suggestions[i] = selenium.getText(format(LOC_THIRD_COMBO_SUGGESTIONS, i));
}
String[] expected = new String[] { "Sacramento", "Santa Fe",
"Salem", "Salt Lake City" };
@@ -209,7 +206,7 @@
assertEqualsNoOrder(suggestions, expected, "Suggestions after typing
'sa'.");
try {
- selenium.clickAt(format(LOC_THIRD_COMBO_CONCRETE_SUGGESTION, 4),
"");
+ selenium.clickAt(format(LOC_THIRD_COMBO_SUGGESTIONS, 3), "");
} catch (Exception ex) {
// why the exception is thrown?
}
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/AdvancedEditorTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -169,10 +169,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_B).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_B);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_BOLD);
selenium.selectFrame("relative=top");
@@ -204,10 +204,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_I).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_I);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_ITALIC);
selenium.selectFrame("relative=top");
@@ -239,10 +239,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_U).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_U);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_UNDERLINED);
selenium.selectFrame("relative=top");
@@ -274,10 +274,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_STRIKE).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_STRIKE);
assertEquals(count, 2, MSG_STRINGS_SHOULD_HAVE_A_LINE_THROUGH);
selenium.selectFrame("relative=top");
@@ -339,13 +339,13 @@
String text = selenium.getText(LOC_TEXT_AREA);
assertEquals(text, "aaaa\nbbbbccccddddeeee",
MSG_CONTENT_OF_THE_EDITOR);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_SHOULD_CONTAIN_A_PARAGRAPH);
boolean isPresent = selenium.isElementPresent(LOC_TEXT_AREA_UL);
assertTrue(isPresent, MSG_EDITOR_SHOULD_CONTAIN_UL);
- count = selenium.getXpathCount(LOC_TEXT_AREA_UL_LI).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_UL_LI);
assertEquals(count, 3, MSG_LIST_SHOULD_CONTAIN_THREE_ITEMS);
selenium.selectFrame("relative=top");
@@ -380,13 +380,13 @@
String text = selenium.getText(LOC_TEXT_AREA);
assertEquals(text, "aaaa\nbbbbccccddddeeee",
MSG_CONTENT_OF_THE_EDITOR);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_SHOULD_CONTAIN_A_PARAGRAPH);
boolean isPresent = selenium.isElementPresent(LOC_TEXT_AREA_OL);
assertTrue(isPresent, MSG_EDITOR_SHOULD_CONTAIN_OL);
- count = selenium.getXpathCount(LOC_TEXT_AREA_OL_LI).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_OL_LI);
assertEquals(count, 3, MSG_LIST_SHOULD_CONTAIN_THREE_ITEMS);
selenium.selectFrame("relative=top");
@@ -444,27 +444,27 @@
}
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 2));
+ selenium.click(format(LOC_ADV_STYLE_N, 1));
assertTrue(belongsClass("bold-larger", LOC_TEXT_AREA_P),
MSG_PARAGRAPHS_CLASS_ATTRIBUTE);
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 3));
+ selenium.click(format(LOC_ADV_STYLE_N, 2));
assertTrue(belongsClass("bold-smaller", LOC_TEXT_AREA_P),
MSG_PARAGRAPHS_CLASS_ATTRIBUTE);
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 4));
+ selenium.click(format(LOC_ADV_STYLE_N, 3));
assertTrue(belongsClass("red-bold", LOC_TEXT_AREA_P),
MSG_PARAGRAPHS_CLASS_ATTRIBUTE);
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 5));
+ selenium.click(format(LOC_ADV_STYLE_N, 4));
assertTrue(belongsClass("red-bold-larger", LOC_TEXT_AREA_P),
MSG_PARAGRAPHS_CLASS_ATTRIBUTE);
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 6));
+ selenium.click(format(LOC_ADV_STYLE_N, 5));
assertTrue(belongsClass("red-bold-smaller", LOC_TEXT_AREA_P),
MSG_PARAGRAPHS_CLASS_ATTRIBUTE);
selenium.click(LOC_ADV_STYLE_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_STYLE_N, 1));
+ selenium.click(format(LOC_ADV_STYLE_N, 0));
try {
selenium.getAttribute(LOC_TEXT_AREA_P + "@class");
fail(MSG_PARAGRAPH_SHOULD_HAVE_NO_STYLE);
@@ -483,7 +483,7 @@
// initial state
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "p"));
String text = selenium.getText(LOC_TEXT_AREA_P);
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "p"));
@@ -491,9 +491,9 @@
// address
selenium.click(LOC_ADV_FORMAT_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_FORMAT_N, 3));
+ selenium.click(format(LOC_ADV_FORMAT_N, 2));
selenium.selectFrame(LOC_IFRAME);
- count = selenium.getXpathCount(LOC_TEXT_AREA_ADDRESS).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_ADDRESS);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR,
"address"));
text = selenium.getText(LOC_TEXT_AREA_ADDRESS);
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "address"));
@@ -501,9 +501,9 @@
// paragraph
selenium.click(LOC_ADV_FORMAT_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_FORMAT_N, 2));
+ selenium.click(format(LOC_ADV_FORMAT_N, 1));
selenium.selectFrame(LOC_IFRAME);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "p"));
text = selenium.getText(LOC_TEXT_AREA_P);
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "p"));
@@ -511,9 +511,9 @@
// preformatted
selenium.click(LOC_ADV_FORMAT_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_FORMAT_N, 4));
+ selenium.click(format(LOC_ADV_FORMAT_N, 3));
selenium.selectFrame(LOC_IFRAME);
- count = selenium.getXpathCount(LOC_TEXT_AREA_PRE).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_PRE);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "pre"));
text = selenium.getText(LOC_TEXT_AREA_PRE);
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "pre"));
@@ -521,9 +521,9 @@
// change back to the initial state by clicking on "Format"
selenium.click(LOC_ADV_FORMAT_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_FORMAT_N, 1));
+ selenium.click(format(LOC_ADV_FORMAT_N, 0));
selenium.selectFrame(LOC_IFRAME);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "p"));
text = selenium.getText(LOC_TEXT_AREA_P);
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "p"));
@@ -532,9 +532,9 @@
// heading 1-6
for (int i = 1; i < 7; i++) {
selenium.click(LOC_ADV_FORMAT_SELECT_BUTTON);
- selenium.click(format(LOC_ADV_FORMAT_N, 4 + i));
+ selenium.click(format(LOC_ADV_FORMAT_N, 3 + i));
selenium.selectFrame(LOC_IFRAME);
- count = selenium.getXpathCount(format(LOC_TEXT_AREA_HN, i)).intValue();
+ count = getJQueryCount(format(LOC_TEXT_AREA_HN, i));
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "h" +
i));
text = selenium.getText(format(LOC_TEXT_AREA_HN, i));
assertEquals(text, "aaa bbb ccc ddd eee fff ggg",
format(MSG_CONTENT_OF_TAG_S, "h" + i));
@@ -584,7 +584,7 @@
Wait.failWith(MSG_NUMBER_OF_RULERS).interval(3000).until(new Condition() {
public boolean isTrue() {
- return selenium.getXpathCount(LOC_TEXT_AREA_P_HR).intValue() == 3;
+ return getJQueryCount(LOC_TEXT_AREA_P_HR) == 3;
}
});
@@ -605,7 +605,7 @@
selenium.typeKeys(LOC_TEXT_AREA, "bbb");
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P2_B).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P2_B);
assertEquals(count, 1, format(MSG_TAG_S_SHOULD_BE_IN_EDITOR, "b"));
String text = selenium.getText(LOC_TEXT_AREA_P2_B);
assertEquals(text, "bbb", format(MSG_CONTENT_OF_TAG_S,
"b"));
@@ -618,7 +618,7 @@
selenium.selectFrame("relative=top");
selenium.click(LOC_ADV_REMOVE_FORMATTING_BUTTON);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_B).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_B);
assertEquals(count, 0, format(MSG_TAG_S_SHOULD_NOT_BE_IN_EDITOR,
"b"));
text = selenium.getText(LOC_TEXT_AREA_P2);
assertEquals(text, "bbb", format(MSG_CONTENT_OF_TAG_S,
"b"));
@@ -755,6 +755,8 @@
} catch (Exception e) {
// OK -- there is no class attribute
}
+
+ selenium.selectFrame("relative=top");
}
/**
@@ -813,23 +815,23 @@
selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
waitForElement(LOC_ADV_DIALOG_IFRAME);
selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 1, 5));
+ waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
// euro sign
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 1, 5));
+ selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 0, 4));
selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
waitForElement(LOC_ADV_DIALOG_IFRAME);
selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 5));
+ waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
// Omega
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 5));
+ selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 8, 4));
selenium.click(LOC_ADV_CUSTOM_CHAR_BUTTON);
waitForElement(LOC_ADV_DIALOG_IFRAME);
selenium.selectFrame(LOC_ADV_DIALOG_IFRAME);
- waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 10, 18));
+ waitForElement(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
// heart suite
- selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 10, 18));
+ selenium.click(format(LOC_ADV_CUSTOM_CHAR_DLG_M_N, 9, 17));
String text = selenium.getText(LOC_TEXT_AREA_P);
assertEquals(text, "€Ω♥", MSG_CONTENT_OF_THE_EDITOR);
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/SimpleEditorTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/SimpleEditorTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/editor/SimpleEditorTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -99,10 +99,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_B).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_B);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_BOLD);
selenium.selectFrame("relative=top");
@@ -134,10 +134,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_I).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_I);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_ITALIC);
selenium.selectFrame("relative=top");
@@ -169,10 +169,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_U).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_U);
assertEquals(count, 2, MSG_STRINGS_SHOULD_BE_UNDERLINED);
selenium.selectFrame("relative=top");
@@ -204,10 +204,10 @@
// select the iframe for Selenium to be able to get iframe's content
selenium.selectFrame(LOC_IFRAME);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_IN_THE_EDITOR);
- count = selenium.getXpathCount(LOC_TEXT_AREA_P2_STRIKE).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_P2_STRIKE);
assertEquals(count, 2, MSG_STRINGS_SHOULD_HAVE_A_LINE_THROUGH);
selenium.selectFrame("relative=top");
@@ -264,13 +264,13 @@
String text = selenium.getText(LOC_TEXT_AREA);
assertEquals(text, "aaaa\nbbbbccccddddeeee",
MSG_CONTENT_OF_THE_EDITOR);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_SHOULD_CONTAIN_A_PARAGRAPH);
boolean isPresent = selenium.isElementPresent(LOC_TEXT_AREA_UL);
assertTrue(isPresent, MSG_EDITOR_SHOULD_CONTAIN_UL);
- count = selenium.getXpathCount(LOC_TEXT_AREA_UL_LI).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_UL_LI);
assertEquals(count, 3, MSG_LIST_SHOULD_CONTAIN_THREE_ITEMS);
selenium.selectFrame("relative=top");
@@ -305,13 +305,13 @@
String text = selenium.getText(LOC_TEXT_AREA);
assertEquals(text, "aaaa\nbbbbccccddddeeee",
MSG_CONTENT_OF_THE_EDITOR);
- int count = selenium.getXpathCount(LOC_TEXT_AREA_P).intValue();
+ int count = getJQueryCount(LOC_TEXT_AREA_P);
assertEquals(count, 2, MSG_TWO_LINES_SHOULD_CONTAIN_A_PARAGRAPH);
boolean isPresent = selenium.isElementPresent(LOC_TEXT_AREA_OL);
assertTrue(isPresent, MSG_EDITOR_SHOULD_CONTAIN_OL);
- count = selenium.getXpathCount(LOC_TEXT_AREA_OL_LI).intValue();
+ count = getJQueryCount(LOC_TEXT_AREA_OL_LI);
assertEquals(count, 3, MSG_LIST_SHOULD_CONTAIN_THREE_ITEMS);
selenium.selectFrame("relative=top");
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceInput/InplaceInputTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceInput/InplaceInputTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceInput/InplaceInputTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -40,7 +40,6 @@
public class InplaceInputTestCase extends AbstractSeleniumRichfacesTestCase {
// messages
- private final String MSG_COMPONENT_DESCRIPTION =
getMsg("COMPONENT_DESCRIPTION");
private final String MSG_INITIAL_VALUE_NAME = getMsg("INITIAL_VALUE_NAME");
private final String MSG_INITIAL_VALUE_EMAIL = getMsg("INITIAL_VALUE_EMAIL");
private final String MSG_NAME_JOHN_SMITH = getMsg("NAME_JOHN_SMITH");
@@ -187,7 +186,7 @@
selenium.type(LOC_SECOND_EMAIL_INPUT, "john(a)smith.name");
// TODO check that the button is visible
selenium.fireEvent(LOC_SECOND_EMAIL_OK, Event.MOUSEDOWN);
-
+
assertTrue(belongsClass("rich-inplace-changed", LOC_SECOND_EMAIL),
MSG_RICH_INPLACE_CHANGED);
assertFalse(belongsClass("rich-inplace-edit", LOC_SECOND_EMAIL),
MSG_NOT_RICH_INPLACE_EDIT);
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceSelect/InplaceSelectTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceSelect/InplaceSelectTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inplaceSelect/InplaceSelectTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -101,10 +101,10 @@
// expand the component and select "Option 4"
selenium.click(LOC_FIRST);
- int count = selenium.getXpathCount(LOC_FIRST_LIST_SPAN).intValue();
+ int count = getJQueryCount(LOC_FIRST_LIST_SPAN);
assertEquals(count, 5, MSG_COUNT_OF_ITEMS);
- selenium.mouseMove(format(LOC_FIRST_LIST_SPAN_N, 4));
+ selenium.mouseMove(format(LOC_FIRST_LIST_SPAN_N, 3));
// TODO explore whether this isn't too low-level
selenium.getEval(format("selenium.browserbot.findElement(\"{0}\").component.save()",
LOC_FIRST_SELECT_VIEW));
@@ -141,14 +141,14 @@
selenium.click(LOC_SECOND_INPUT_1);
selenium.click(LOC_SECOND_INPUT_2);
- int count = selenium.getXpathCount(LOC_SECOND_LIST_SPAN).intValue();
+ int count = getJQueryCount(LOC_SECOND_LIST_SPAN);
assertEquals(count, 50, MSG_COUNT_OF_ITEMS);
text = selenium.getText(LOC_SECOND);
assertTrue(text.equals("Double Click to edit"),
MSG_DOUBLE_CLICK_TO_EDIT);
// expand the inplace select and click "Arkansas"
- selenium.mouseMove(format(LOC_SECOND_LIST_SPAN_N, 4));
+ selenium.mouseMove(format(LOC_SECOND_LIST_SPAN_N, 3));
selenium.mouseDown(LOC_SECOND_OK_BUTTON);
text = selenium.getText(LOC_SECOND);
@@ -178,7 +178,7 @@
selenium.click(LOC_THIRD_INPUT_1);
selenium.click(LOC_THIRD_INPUT_2);
- int count = selenium.getXpathCount(LOC_THIRD_LIST_SPAN).intValue();
+ int count = getJQueryCount(LOC_THIRD_LIST_SPAN);
assertEquals(count, 50, MSG_COUNT_OF_ITEMS);
text = selenium.getText(LOC_THIRD);
@@ -188,7 +188,7 @@
text = selenium.getText(LOC_THIRD_CAPITAL);
// select "Arkansas"
- selenium.mouseMove(format(LOC_THIRD_LIST_SPAN_N, 4));
+ selenium.mouseMove(format(LOC_THIRD_LIST_SPAN_N, 3));
selenium.mouseDown(LOC_THIRD_SAVE_BUTTON);
// wait for remembered value change
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inputNumberSlider/InputNumberSliderTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inputNumberSlider/InputNumberSliderTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/inputNumberSlider/InputNumberSliderTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -53,20 +53,20 @@
// locators
private final String LOC_EXAMPLE_HEADER = getLoc("EXAMPLE_HEADER");
- private final String LOC_FIRST = format(getLoc("SLIDER_N"), 1);
- private final String LOC_FIRST_HANDLE = format(getLoc("SLIDER_N_HANDLE"), 1);
- private final String LOC_FIRST_TIP = format(getLoc("SLIDER_N_TIP"), 1);
- private final String LOC_FIRST_INPUT = format(getLoc("SLIDER_N_INPUT"), 1);
+ private final String LOC_FIRST = format(getLoc("SLIDER_N"), 0);
+ private final String LOC_FIRST_HANDLE = format(getLoc("SLIDER_N_HANDLE"), 0);
+ private final String LOC_FIRST_TIP = format(getLoc("SLIDER_N_TIP"), 0);
+ private final String LOC_FIRST_INPUT = format(getLoc("SLIDER_N_INPUT"), 0);
- private final String LOC_SECOND = format(getLoc("SLIDER_N"), 2);
- private final String LOC_SECOND_HANDLE = format(getLoc("SLIDER_N_HANDLE"),
2);
- private final String LOC_SECOND_TIP = format(getLoc("SLIDER_N_TIP"), 2);
- private final String LOC_SECOND_INPUT = format(getLoc("SLIDER_N_INPUT"), 2);
+ private final String LOC_SECOND = format(getLoc("SLIDER_N"), 1);
+ private final String LOC_SECOND_HANDLE = format(getLoc("SLIDER_N_HANDLE"),
1);
+ private final String LOC_SECOND_TIP = format(getLoc("SLIDER_N_TIP"), 1);
+ private final String LOC_SECOND_INPUT = format(getLoc("SLIDER_N_INPUT"), 1);
- private final String LOC_THIRD = format(getLoc("SLIDER_N"), 3);
- private final String LOC_THIRD_HANDLE = format(getLoc("SLIDER_N_HANDLE"), 3);
- private final String LOC_THIRD_TIP = format(getLoc("SLIDER_N_TIP"), 3);
- private final String LOC_THIRD_INPUT = format(getLoc("SLIDER_N_INPUT"), 3);
+ private final String LOC_THIRD = format(getLoc("SLIDER_N"), 2);
+ private final String LOC_THIRD_HANDLE = format(getLoc("SLIDER_N_HANDLE"), 2);
+ private final String LOC_THIRD_TIP = format(getLoc("SLIDER_N_TIP"), 2);
+ private final String LOC_THIRD_INPUT = format(getLoc("SLIDER_N_INPUT"), 2);
/**
* Tests clicking on the first slider. First, it checks the offset of the handler and
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/suggestionBox/SuggestionBoxTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/suggestionBox/SuggestionBoxTestCase.java 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/suggestionBox/SuggestionBoxTestCase.java 2009-10-29
11:22:08 UTC (rev 15774)
@@ -86,39 +86,39 @@
// select Atlanta
selenium.typeKeys(LOC_FIRST_INPUT, "at");
- waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
- selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
// select Madison
selenium.typeKeys(LOC_FIRST_INPUT, ",ma");
- waitForTextEquals(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1),
"MadisonWisconsin");
- selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ waitForTextEquals(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0),
"MadisonWisconsin");
+ selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
- String text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 1));
- assertEquals(text, "Georgia", format(MSG_TABLE_PREFORMATTED, 1, 1));
+ String text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 0));
+ assertEquals(text, "Georgia", format(MSG_TABLE_PREFORMATTED, 1, 0));
+ text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 1));
+ assertEquals(text, "Atlanta", format(MSG_TABLE_PREFORMATTED, 1, 1));
+
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 2));
- assertEquals(text, "Atlanta", format(MSG_TABLE_PREFORMATTED, 1, 2));
+ assertEquals(text, "Augusta", format(MSG_TABLE_PREFORMATTED, 1, 2));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 3));
- assertEquals(text, "Augusta", format(MSG_TABLE_PREFORMATTED, 1, 3));
+ assertEquals(text, "Columbus", format(MSG_TABLE_PREFORMATTED, 1, 3));
- text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 4));
- assertEquals(text, "Columbus", format(MSG_TABLE_PREFORMATTED, 1, 4));
+ text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 0));
+ assertEquals(text, "Wisconsin", format(MSG_TABLE_PREFORMATTED, 2, 0));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 1));
- assertEquals(text, "Wisconsin", format(MSG_TABLE_PREFORMATTED, 2, 1));
+ assertEquals(text, "Milwaukee", format(MSG_TABLE_PREFORMATTED, 2, 1));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 2));
- assertEquals(text, "Milwaukee", format(MSG_TABLE_PREFORMATTED, 2, 2));
+ assertEquals(text, "Madison", format(MSG_TABLE_PREFORMATTED, 2, 2));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 3));
- assertEquals(text, "Madison", format(MSG_TABLE_PREFORMATTED, 2, 3));
-
- text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 4));
- assertEquals(text, "Green Bay", format(MSG_TABLE_PREFORMATTED, 2, 4));
+ assertEquals(text, "Green Bay", format(MSG_TABLE_PREFORMATTED, 2, 3));
}
/**
@@ -131,40 +131,40 @@
// select Atlanta
selenium.typeKeys(LOC_FIRST_INPUT, "[at");
- waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
- selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
selenium.typeKeys(LOC_FIRST_INPUT, "]");
// select Madison
selenium.typeKeys(LOC_FIRST_INPUT, "[ma");
- waitForTextEquals(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1),
"MadisonWisconsin");
- selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
+ waitForTextEquals(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0),
"MadisonWisconsin");
+ selenium.click(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
selenium.typeKeys(LOC_FIRST_INPUT, "]");
- String text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 1));
- assertEquals(text, "Georgia", format(MSG_TABLE_PREFORMATTED, 1, 1));
+ String text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 0));
+ assertEquals(text, "Georgia", format(MSG_TABLE_PREFORMATTED, 1, 0));
+ text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 1));
+ assertEquals(text, "Atlanta", format(MSG_TABLE_PREFORMATTED, 1, 1));
+
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 2));
- assertEquals(text, "Atlanta", format(MSG_TABLE_PREFORMATTED, 1, 2));
+ assertEquals(text, "Augusta", format(MSG_TABLE_PREFORMATTED, 1, 2));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 3));
- assertEquals(text, "Augusta", format(MSG_TABLE_PREFORMATTED, 1, 3));
+ assertEquals(text, "Columbus", format(MSG_TABLE_PREFORMATTED, 1, 3));
- text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 1, 4));
- assertEquals(text, "Columbus", format(MSG_TABLE_PREFORMATTED, 1, 4));
+ text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 0));
+ assertEquals(text, "Wisconsin", format(MSG_TABLE_PREFORMATTED, 2, 0));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 1));
- assertEquals(text, "Wisconsin", format(MSG_TABLE_PREFORMATTED, 2, 1));
+ assertEquals(text, "Milwaukee", format(MSG_TABLE_PREFORMATTED, 2, 1));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 2));
- assertEquals(text, "Milwaukee", format(MSG_TABLE_PREFORMATTED, 2, 2));
+ assertEquals(text, "Madison", format(MSG_TABLE_PREFORMATTED, 2, 2));
text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 3));
- assertEquals(text, "Madison", format(MSG_TABLE_PREFORMATTED, 2, 3));
-
- text = selenium.getText(format(LOC_FIRST_TOWN_TABLE_PREFORMATTED, 2, 4));
- assertEquals(text, "Green Bay", format(MSG_TABLE_PREFORMATTED, 2, 4));
+ assertEquals(text, "Green Bay", format(MSG_TABLE_PREFORMATTED, 2, 3));
}
/**
@@ -178,8 +178,8 @@
// select aaa
selenium.typeKeys(LOC_FIRST_INPUT, "aaa");
- waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 1));
- String text = selenium.getText(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED,
1));
+ waitForElement(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED, 0));
+ String text = selenium.getText(format(LOC_FIRST_SUGGESTION_BOX_PREFORMATTED,
0));
assertEquals(text, "No capitals found",
MSG_PREFORMATTEDO_CAPITALS_FOUND);
}
@@ -481,7 +481,8 @@
selenium.click(LOC_SECOND_BUTTON);
waitForElement(LOC_SECOND_SUGGESTION_LINES);
- int count = selenium.getXpathCount(LOC_SECOND_SUGGESTION_LINES).intValue();
+// int count = selenium.getXpathCount(LOC_SECOND_SUGGESTION_LINES).intValue();
+ int count = getJQueryCount(LOC_SECOND_SUGGESTION_LINES);
assertEquals(count, 50, MSG_COUNT_OF_ALL_SUGGESTIONS);
}
@@ -494,8 +495,8 @@
scrollIntoView(LOC_SECOND_INPUT, true);
selenium.typeKeys(LOC_SECOND_INPUT, "a");
- waitForElement(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2));
- selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2)); // Augusta
+ waitForElement(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 1));
+ selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 1)); // Augusta
String state = selenium.getText(LOC_SECOND_STATE);
assertEquals(state, "Maine", MSG_AUGUSTA_MAINE);
@@ -512,12 +513,12 @@
scrollIntoView(LOC_SECOND_INPUT, true);
selenium.typeKeys(LOC_SECOND_INPUT, "a");
- waitForElement(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2));
- selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2)); // Augusta
+ waitForElement(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 1));
+ selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 1)); // Augusta
selenium.typeKeys(LOC_SECOND_INPUT, ",m");
- waitForTextEquals(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 3),
"Madison");
- selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 3)); // Madison
+ waitForTextEquals(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2),
"Madison");
+ selenium.click(format(LOC_SECOND_SUGGESTION_BOX_PREFORMATTED, 2)); // Madison
Wait.failWith(MSG_AUGUSTA_MADISON_MAINE_WISCONSIN).until(new Condition() {
public boolean isTrue() {
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/colorPicker/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/colorPicker/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/colorPicker/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,23 +1,23 @@
-COMPONENT_HEADER=//fieldset[1]/legend
+COMPONENT_HEADER=jquery=fieldset:eq(0) > legend
-IMAGE=//fieldset[1]/div/form/table/tbody/tr[1]/td/img
-COLOR_INPUT=//fieldset[1]/div/form/table/tbody/tr[2]/td[1]/span/input
-COLOR_BUTTON=//fieldset[1]/div/form/table/tbody/tr[2]/td[1]/span/img
+IMAGE=jquery=fieldset:eq(0) img[id$=painter]
+COLOR_INPUT=jquery=fieldset:eq(0) span.rich-color-picker-span > input
+COLOR_BUTTON=jquery=fieldset:eq(0) span.rich-color-picker-span > img
-COLOR_AREA=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[1]
-CURSOR=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[1]/div/div
-RED_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[6]/input
-GREEN_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[7]/input
-BLUE_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[8]/input
-HUE_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[9]/input
-SATURATION_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[10]/input
-BRIGHTNESS_VALUE=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[11]/input
-CURRENT_COLOR_BOX=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[3]
-ORIGINAL_COLOR_BOX=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[4]
-RAINBOW=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[2]/img
+COLOR_AREA=jquery=fieldset:eq(0) div[id$=colorPicker-popup] div.rich-color-picker-color
+CURSOR=jquery=fieldset:eq(0) div[id$=colorPicker-popup] div.rich-color-picker-color >
div > div
+RED_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-rgb-r]
+GREEN_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-rgb-g]
+BLUE_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-rgb-b]
+HUE_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-hsb-h]
+SATURATION_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-hsb-s]
+BRIGHTNESS_VALUE=jquery=fieldset:eq(0) input[id$=colorPicker-hsb-b]
+CURRENT_COLOR_BOX=jquery=fieldset:eq(0) div.rich-color-picker-new-color
+ORIGINAL_COLOR_BOX=jquery=fieldset:eq(0) div.rich-color-picker-current-color
+RAINBOW=jquery=fieldset:eq(0) div.rich-color-picker-rainbow > img
-HEX_COLOR=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/div[5]/input
-APPLY_BUTTON=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/button[1]
-CANCEL_BUTTON=//fieldset[1]/div/form/table/tbody/tr[2]/td/div[1]/div/button[2]
+HEX_COLOR=jquery=fieldset:eq(0) input[id$=colorPicker-hex]
+APPLY_BUTTON=jquery=fieldset:eq(0) button[name=apply]
+CANCEL_BUTTON=jquery=fieldset:eq(0) button[name=cancel]
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/comboBox/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/comboBox/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/comboBox/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,14 +1,11 @@
-FIRST_COMBO_INPUT=//fieldset[1]/div/div[1]/div/div[2]/input[1]
-FIRST_COMBO_BUTTON=//fieldset[1]/div/div[1]/div/div[2]/input[3]
-FIRST_COMBO_CONCRETE_SUGGESTION=//body//div[@class='rich-combobox-list-scroll']/span[{0}]
-FIRST_COMBO_SUGGESTIONS=//body//div[@class='rich-combobox-list-scroll']/span
+FIRST_COMBO_INPUT=jquery=fieldset:eq(0) input[id$=comboboxField]
+FIRST_COMBO_BUTTON=jquery=fieldset:eq(0) input[id$=comboboxButton]
+FIRST_COMBO_SUGGESTIONS=jquery=div.rich-combobox-list-scroll >
span{0,choice,-1#|0#:eq({0})}
-SECOND_COMBO_INPUT=//fieldset[2]/div/div[1]/div/div[2]/input[1]
-SECOND_COMBO_BUTTON=//fieldset[2]/div/div[1]/div/div[2]/input[3]
-SECOND_COMBO_CONCRETE_SUGGESTION=//body//div[@class='rich-combobox-list-scroll']/span[{0}]
-SECOND_COMBO_SUGGESTIONS=//body//div[@class='rich-combobox-list-scroll']/span
+SECOND_COMBO_INPUT=jquery=fieldset:eq(1) input[id$=comboboxField]
+SECOND_COMBO_BUTTON=jquery=fieldset:eq(1) input[id$=comboboxButton]
+SECOND_COMBO_SUGGESTIONS=jquery=div.rich-combobox-list-scroll >
span{0,choice,-1#|0#:eq({0})}
-THIRD_COMBO_INPUT=//fieldset[3]/div/div[1]/div/div[2]/input[1]
-THIRD_COMBO_BUTTON=//fieldset[3]/div/div[1]/div/div[2]/input[3]
-THIRD_COMBO_CONCRETE_SUGGESTION=//body//div[@class='rich-combobox-list-scroll']/span[{0}]
-THIRD_COMBO_SUGGESTIONS=//body//div[@class='rich-combobox-list-scroll']/span
\ No newline at end of file
+THIRD_COMBO_INPUT=jquery=fieldset:eq(2) input[id$=comboboxField]
+THIRD_COMBO_BUTTON=jquery=fieldset:eq(2) input[id$=comboboxButton]
+THIRD_COMBO_SUGGESTIONS=jquery=div.rich-combobox-list-scroll >
span{0,choice,-1#|0#:eq({0})}
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/editor/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/editor/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/editor/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,87 +1,87 @@
-ADVANCED_BUTTON=//div[@id='form:controls_body']/table/tbody/tr[1]/td[2]/table/tbody/tr[2]/td/input
-EXAMPLE_HEADER=//fieldset[1]/legend
+ADVANCED_BUTTON=jquery=fieldset:eq(0) div[id$=controls] tr:eq(0) tr:eq(1) input
+EXAMPLE_HEADER=jquery=fieldset:eq(0) legend
-TEXT_AREA=id=tinymce
-IFRAME=id=form:editorTextArea_ifr
-ADV_DIALOG_IFRAME=//iframe[matches(@id, 'mce_\\d{1,2}_ifr')]
-TEXT_AREA_P=//body[@id='tinymce']/p
-TEXT_AREA_P_A=//body[@id='tinymce']/p/a
-TEXT_AREA_P_IMG=//body[@id='tinymce']/p/img
-TEXT_AREA_P_SPAN=//body[@id='tinymce']/p/span
-TEXT_AREA_P_HR=//body[@id='tinymce']/p/hr
-TEXT_AREA_P_SUB=//body[@id='tinymce']/p/sub
-TEXT_AREA_P_SUP=//body[@id='tinymce']/p/sup
-TEXT_AREA_P2=//body[@id='tinymce']/p[2]
-TEXT_AREA_P2_B=//body[@id='tinymce']/p[2]/b
-TEXT_AREA_P2_I=//body[@id='tinymce']/p[2]/i
-TEXT_AREA_P2_U=//body[@id='tinymce']/p[2]/u
-TEXT_AREA_P2_STRIKE=//body[@id='tinymce']/p[2]/strike
-TEXT_AREA_OL=//body[@id='tinymce']/ol
-TEXT_AREA_OL_LI=//body[@id='tinymce']/ol/li
-TEXT_AREA_UL=//body[@id='tinymce']/ul
-TEXT_AREA_UL_LI=//body[@id='tinymce']/ul/li
-TEXT_AREA_ADDRESS=//body[@id='tinymce']/address
-TEXT_AREA_PRE=//body[@id='tinymce']/pre
-TEXT_AREA_HN=//body[@id='tinymce']/h{0}
+TEXT_AREA=jquery=#tinymce
+IFRAME=jquery\=iframe\#form\\\:editorTextArea_ifr
+ADV_DIALOG_IFRAME=jquery=iframe[id*=mce_]
+TEXT_AREA_P=jquery=body#tinymce > p
+TEXT_AREA_P_A=jquery=body#tinymce > p > a
+TEXT_AREA_P_IMG=jquery=body#tinymce > p > img
+TEXT_AREA_P_SPAN=jquery=body#tinymce > p > span
+TEXT_AREA_P_HR=jquery=body#tinymce > p > hr
+TEXT_AREA_P_SUB=jquery=body#tinymce > p > sub
+TEXT_AREA_P_SUP=jquery=body#tinymce > p > sup
+TEXT_AREA_P2=jquery=body#tinymce > p:eq(1)
+TEXT_AREA_P2_B=jquery=body#tinymce > p:eq(1) > b
+TEXT_AREA_P2_I=jquery=body#tinymce > p:eq(1) > i
+TEXT_AREA_P2_U=jquery=body#tinymce > p:eq(1) > u
+TEXT_AREA_P2_STRIKE=jquery=body#tinymce > p:eq(1) > strike
+TEXT_AREA_OL=jquery=body#tinymce > ol
+TEXT_AREA_OL_LI=jquery=body#tinymce > ol > li
+TEXT_AREA_UL=jquery=body#tinymce > ul
+TEXT_AREA_UL_LI=jquery=body#tinymce > ul > li
+TEXT_AREA_ADDRESS=jquery=body#tinymce > address
+TEXT_AREA_PRE=jquery=body#tinymce > pre
+TEXT_AREA_HN=jquery=body#tinymce > h{0}
# simple editor' buttons
-BOLD_BUTTON=id=form:editorTextArea_bold
-ITALIC_BUTTON=id=form:editorTextArea_italic
-UNDERLINE_BUTTON=id=form:editorTextArea_underline
-STRIKETHROUGH_BUTTON=id=form:editorTextArea_strikethrough
-UNDO_BUTTON=id=form:editorTextArea_undo
-REDO_BUTTON=id=form:editorTextArea_redo
-UNORDERED_LIST_BUTTON=id=form:editorTextArea_insertunorderedlist
-ORDERED_LIST_BUTTON=id=form:editorTextArea_insertorderedlist
+BOLD_BUTTON=jquery=a#form\\:editorTextArea_bold
+ITALIC_BUTTON=jquery=a#form\\:editorTextArea_italic
+UNDERLINE_BUTTON=jquery=a#form\\:editorTextArea_underline
+STRIKETHROUGH_BUTTON=jquery=a#form\\:editorTextArea_strikethrough
+UNDO_BUTTON=jquery=a#form\\:editorTextArea_undo
+REDO_BUTTON=jquery=a#form\\:editorTextArea_redo
+UNORDERED_LIST_BUTTON=jquery=a#form\\:editorTextArea_insertunorderedlist
+ORDERED_LIST_BUTTON=jquery=a#form\\:editorTextArea_insertorderedlist
# advanced editor's buttons
-ADV_UNORDERED_LIST_BUTTON=id=form:editorTextArea_bullist
-ADV_ORDERED_LIST_BUTTON=id=form:editorTextArea_numlist
-ADV_ALIGN_LEFT_BUTTON=id=form:editorTextArea_justifyleft
-ADV_ALIGN_RIGHT_BUTTON=id=form:editorTextArea_justifyright
-ADV_ALIGN_CENTER_BUTTON=id=form:editorTextArea_justifycenter
-ADV_ALIGN_FULL_BUTTON=id=form:editorTextArea_justifyfull
-ADV_STYLE_SELECT_BUTTON=id=form:editorTextArea_styleselect_open
-ADV_FORMAT_SELECT_BUTTON=id=form:editorTextArea_formatselect_open
-ADV_STYLE_N=//table[@id='menu_form:editorTextArea_form:editorTextArea_styleselect_menu_tbl']/tbody/tr[{0}]
-ADV_FORMAT_N=//table[@id='menu_form:editorTextArea_form:editorTextArea_formatselect_menu_tbl']/tbody/tr[{0}]
-ADV_INDENT_BUTTON=id=form:editorTextArea_indent
-ADV_OUTDENT_BUTTON=id=form:editorTextArea_outdent
-ADV_HORIZONTAL_RULER_BUTTON=id=form:editorTextArea_hr
-ADV_REMOVE_FORMATTING_BUTTON=id=form:editorTextArea_removeformat
-ADV_SUBSCRIPT_BUTTON=id=form:editorTextArea_sub
-ADV_SUPERSCRIPT_BUTTON=id=form:editorTextArea_sup
-ADV_LINK_BUTTON=id=form:editorTextArea_link
-ADV_UNLINK_BUTTON=id=form:editorTextArea_unlink
-ADV_TOGGLE_INVISIBLE_BUTTON=id=form:editorTextArea_visualaid
-ADV_ANCHOR_BUTTON=id=form:editorTextArea_anchor
-ADV_IMAGE_BUTTON=id=form:editorTextArea_image
-ADV_CUSTOM_CHAR_BUTTON=id=form:editorTextArea_charmap
+ADV_UNORDERED_LIST_BUTTON=jquery=a#form\\:editorTextArea_bullist
+ADV_ORDERED_LIST_BUTTON=jquery=a#form\\:editorTextArea_numlist
+ADV_ALIGN_LEFT_BUTTON=jquery=a#form\\:editorTextArea_justifyleft
+ADV_ALIGN_RIGHT_BUTTON=jquery=a#form\\:editorTextArea_justifyright
+ADV_ALIGN_CENTER_BUTTON=jquery=a#form\\:editorTextArea_justifycenter
+ADV_ALIGN_FULL_BUTTON=jquery=a#form\\:editorTextArea_justifyfull
+ADV_STYLE_SELECT_BUTTON=jquery=a#form\\:editorTextArea_styleselect_open
+ADV_FORMAT_SELECT_BUTTON=jquery=a#form\\:editorTextArea_formatselect_open
+ADV_STYLE_N=jquery=table#menu_form\\:editorTextArea_form\\:editorTextArea_styleselect_menu_tbl
tr:eq({0})
+ADV_FORMAT_N=jquery=table#menu_form\\:editorTextArea_form\\:editorTextArea_formatselect_menu_tbl
tr:eq({0})
+ADV_INDENT_BUTTON=jquery=a#form\\:editorTextArea_indent
+ADV_OUTDENT_BUTTON=jquery=a#form\\:editorTextArea_outdent
+ADV_HORIZONTAL_RULER_BUTTON=jquery=a#form\\:editorTextArea_hr
+ADV_REMOVE_FORMATTING_BUTTON=jquery=a#form\\:editorTextArea_removeformat
+ADV_SUBSCRIPT_BUTTON=jquery=a#form\\:editorTextArea_sub
+ADV_SUPERSCRIPT_BUTTON=jquery=a#form\\:editorTextArea_sup
+ADV_LINK_BUTTON=jquery=a#form\\:editorTextArea_link
+ADV_UNLINK_BUTTON=jquery=a#form\\:editorTextArea_unlink
+ADV_TOGGLE_INVISIBLE_BUTTON=jquery=a#form\\:editorTextArea_visualaid
+ADV_ANCHOR_BUTTON=jquery=a#form\\:editorTextArea_anchor
+ADV_IMAGE_BUTTON=jquery=a#form\\:editorTextArea_image
+ADV_CUSTOM_CHAR_BUTTON=jquery=a#form\\:editorTextArea_charmap
# insert/edit link dialog
-ADV_LINK_DLG_URL=id=href
-ADV_LINK_DLG_TARGET_N=id=target_list
-ADV_LINK_DLG_TITLE=id=linktitle
-ADV_LINK_DLG_CLASS_N=id=class_list
-ADV_LINK_DLG_UPDATE=id=insert
+ADV_LINK_DLG_URL=jquery=input#href
+ADV_LINK_DLG_TARGET_N=jquery=select#target_list
+ADV_LINK_DLG_TITLE=jquery=input#linktitle
+ADV_LINK_DLG_CLASS_N=jquery=select#class_list
+ADV_LINK_DLG_UPDATE=jquery=input#insert
# insert/edit anchor dialog
-ADV_ANCHOR_DLG_NAME=id=anchorName
-ADV_ANCHOR_DLG_INSERT_BUTTON=id=insert
+ADV_ANCHOR_DLG_NAME=jquery=input#anchorName
+ADV_ANCHOR_DLG_INSERT_BUTTON=jquery=input#insert
# insert/edit image dialog
-ADV_IMAGE_DLG_URL=id=src
-ADV_IMAGE_DLG_DESCRIPTION=id=alt
-ADV_IMAGE_DLG_ALIGNMENT=id=align
-ADV_IMAGE_DLG_WIDTH=id=width
-ADV_IMAGE_DLG_HEIGHT=id=height
-ADV_IMAGE_DLG_BORDER=id=border
-ADV_IMAGE_DLG_VSPACE=id=vspace
-ADV_IMAGE_DLG_HSPACE=id=hspace
-ADV_IMAGE_DLG_INSERT_BUTTON=id=insert
+ADV_IMAGE_DLG_URL=jquery=input#src
+ADV_IMAGE_DLG_DESCRIPTION=jquery=input#alt
+ADV_IMAGE_DLG_ALIGNMENT=jquery=select#align
+ADV_IMAGE_DLG_WIDTH=jquery=input#width
+ADV_IMAGE_DLG_HEIGHT=jquery=input#height
+ADV_IMAGE_DLG_BORDER=jquery=input#border
+ADV_IMAGE_DLG_VSPACE=jquery=input#vspace
+ADV_IMAGE_DLG_HSPACE=jquery=input#hspace
+ADV_IMAGE_DLG_INSERT_BUTTON=jquery=input#insert
# insert custom character dialog
-ADV_CUSTOM_CHAR_DLG_M_N=//td[@id='charmapView']/table/tbody/tr[{0}]/td[{1}]/a
+ADV_CUSTOM_CHAR_DLG_M_N=jquery=td#charmapView tr:eq({0}) > td:eq({1}) > a
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,16 +1,16 @@
-FIRST_NAME=//fieldset[1]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span
-FIRST_NAME_INPUT=//fieldset[1]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span/input
-FIRST_EMAIL=//fieldset[1]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span
-FIRST_EMAIL_INPUT=//fieldset[1]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span/input
-SECOND_NAME=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span
-SECOND_NAME_INPUT=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span/input
-SECOND_NAME_OK=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span/div/div[2]/input[1]
-SECOND_NAME_CANCEL=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/span/div/div[2]/input[2]
-SECOND_EMAIL=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span
-SECOND_EMAIL_INPUT=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span/input
-SECOND_EMAIL_OK=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span/div/div[2]/input[1]
-SECOND_EMAIL_CANCEL=//fieldset[2]/div/div[1]/div[2]/table/tbody/tr[2]/td[2]/span/div/div[2]/input[2]
-THIRD=//fieldset[3]/div/span
-THIRD_INPUT=//fieldset[3]/div/span/input
-THIRD_SAVE=//fieldset[3]/div/span/div/button[1]
-THIRD_CANCEL=//fieldset[3]/div/span/div/button[2]
\ No newline at end of file
+FIRST_NAME=jquery=fieldset:eq(0) span.rich-inplace-input:eq(0)
+FIRST_NAME_INPUT=jquery=fieldset:eq(0) span.rich-inplace-input:eq(0) > input
+FIRST_EMAIL=jquery=fieldset:eq(0) span.rich-inplace-input:eq(1)
+FIRST_EMAIL_INPUT=jquery=fieldset:eq(0) span.rich-inplace-input:eq(1) > input
+SECOND_NAME=jquery=fieldset:eq(1) span.rich-inplace-input:eq(0)
+SECOND_NAME_INPUT=jquery=fieldset:eq(1) span.rich-inplace-input:eq(0) > input
+SECOND_NAME_OK=jquery=fieldset:eq(1) span.rich-inplace-input:eq(0) input[id$=ok]
+SECOND_NAME_CANCEL=jquery=fieldset:eq(1) span.rich-inplace-input:eq(0) input[id$=cancel]
+SECOND_EMAIL=jquery=fieldset:eq(1) span.rich-inplace-input:eq(1)
+SECOND_EMAIL_INPUT=jquery=fieldset:eq(1) span.rich-inplace-input:eq(1) > input
+SECOND_EMAIL_OK=jquery=fieldset:eq(1) span.rich-inplace-input:eq(1) input[id$=ok]
+SECOND_EMAIL_CANCEL=jquery=fieldset:eq(1) span.rich-inplace-input:eq(1)
input[id$=cancel]
+THIRD=jquery=fieldset:eq(2) span#inplaceInput
+THIRD_INPUT=jquery=fieldset:eq(2) input#inplaceInputtempValue
+THIRD_SAVE=jquery=fieldset:eq(2) div#inplaceInputbar > button:eq(0)
+THIRD_CANCEL=jquery=fieldset:eq(2) div#inplaceInputbar > button:eq(1)
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/messages.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/messages.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceInput/messages.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,4 +1,3 @@
-COMPONENT_DESCRIPTION=InplaceInput is a simple input component which displays the current
value
INITIAL_VALUE_NAME=Default value in the inplace input should be "click to enter your
name".
INITIAL_VALUE_EMAIL=Default value in the inplace input should be "click to enter
your email".
NAME_JOHN_SMITH=The input should contain "John Smith".
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceSelect/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceSelect/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inplaceSelect/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,21 +1,21 @@
-FIRST=//fieldset[1]/div/span
-FIRST_SELECT_VIEW=//fieldset[1]//*[contains(@class,'rich-inplace-select-view')]
-FIRST_INPUT_1=//fieldset[1]/div/span/input[1]
-FIRST_INPUT_2=//fieldset[1]/div/span/input[2]
-FIRST_LIST_SPAN_N=//*[@class\='rich-inplace-select-list-scroll']/span[starts-with(text(),'Option')][{0}]
-FIRST_LIST_SPAN=//*[@class\='rich-inplace-select-list-scroll']/span[starts-with(text(),'Option')]
+FIRST=jquery=fieldset:eq(0) > div > span
+FIRST_SELECT_VIEW=jquery=fieldset:eq(0) span.rich-inplace-select
+FIRST_INPUT_1=jquery=fieldset:eq(0) input[id$=tempValue]
+FIRST_INPUT_2=jquery=fieldset:eq(0) input[id$=inselArrow]
+FIRST_LIST_SPAN_N=jquery=body > div[id$=listParent]
div.rich-inplace-select-list-scroll > span:eq({0})
+FIRST_LIST_SPAN=jquery=body > div[id$=listParent] div.rich-inplace-select-list-scroll
> span
-SECOND=//fieldset[2]/div/div[1]/div
-SECOND_INPUT_1=//fieldset[2]/div/div[1]/div/input[1]
-SECOND_INPUT_2=//fieldset[2]/div/div[1]/div/input[2]
-SECOND_LIST_SPAN_N=//*[not(contains(@class,'rich-inplace-select-view'))]/*/*/*/*[@class\='rich-inplace-select-list-scroll']/span[text()\='Alabama']/../span[{0}]
-SECOND_LIST_SPAN=//*[not(contains(@class,'rich-inplace-select-view'))]/*/*/*/*[@class\='rich-inplace-select-list-scroll']/span[text()\='Alabama']/../span
-SECOND_OK_BUTTON=//fieldset[2]/div/div[1]/div/div/div[2]/input[1]
+SECOND=jquery=fieldset:eq(1) div.rich-inplace-select
+SECOND_INPUT_1=jquery=fieldset:eq(1) input[id$=tempValue]
+SECOND_INPUT_2=jquery=fieldset:eq(1) input[id$=inselArrow]
+SECOND_LIST_SPAN_N=jquery=body > div[id$=listParent]
div.rich-inplace-select-list-scroll > span:eq({0})
+SECOND_LIST_SPAN=jquery=body > div[id$=listParent] div.rich-inplace-select-list-scroll
> span
+SECOND_OK_BUTTON=jquery=fieldset:eq(1) input[id$=ok]
-THIRD=//fieldset[3]/div/form/table/tbody/tr/td[2]/span
-THIRD_INPUT_1=//fieldset[3]/div/form/table/tbody/tr/td[2]/span/input[1]
-THIRD_INPUT_2=//fieldset[3]/div/form/table/tbody/tr/td[2]/span/input[2]
-THIRD_LIST_SPAN_N=//*[not(contains(@class,'rich-inplace-select-view'))]/*/*/*/*[@class\='rich-inplace-select-list-scroll']/span[text()\='Alabama']/../span[{0}]
-THIRD_LIST_SPAN=//*[not(contains(@class,'rich-inplace-select-view'))]/*/*/*/*[@class\='rich-inplace-select-list-scroll']/span[text()\='Alabama']/../span
-THIRD_CAPITAL=//fieldset[3]/div/form/table/tbody/tr/td[3]/span
-THIRD_SAVE_BUTTON=//fieldset[3]/div/form/table/tbody/tr/td[2]/span/div/button[1]
\ No newline at end of file
+THIRD=jquery=fieldset:eq(2) span.rich-inplace-select
+THIRD_INPUT_1=jquery=fieldset:eq(2) input[id$=inplaceSelecttempValue]
+THIRD_INPUT_2=jquery=fieldset:eq(2) input[id$=inplaceSelectinselArrow]
+THIRD_LIST_SPAN_N=jquery=body > div[id$=listParent]
div.rich-inplace-select-list-scroll > span:eq({0})
+THIRD_LIST_SPAN=jquery=body > div[id$=listParent] div.rich-inplace-select-list-scroll
> span
+THIRD_CAPITAL=jquery=fieldset:eq(2) span[id$=output]
+THIRD_SAVE_BUTTON=jquery=fieldset:eq(2) button:eq(0)
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inputNumberSlider/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inputNumberSlider/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/inputNumberSlider/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,5 +1,5 @@
-EXAMPLE_HEADER=//fieldset/legend
-SLIDER_N=//fieldset[1]/div/table[{0}]/tbody/tr[2]/td/table/tbody/tr/td
-SLIDER_N_HANDLE=//fieldset[1]/div/table[{0}]/tbody/tr[2]/td/table/tbody/tr/td/div[1]/div[2]
-SLIDER_N_TIP=//fieldset[1]/div/table[{0}]/tbody/tr[2]/td/table/tbody/tr/td/div[1]/div[1]
-SLIDER_N_INPUT=//fieldset[1]/div/table[{0}]/tbody/tr[1]/td[3]/input
+EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+SLIDER_N=jquery=fieldset:eq(0) > div > table:eq({0}) td[id$=Track]
+SLIDER_N_HANDLE=jquery=fieldset:eq(0) > div > table:eq({0}) div[id$=Handle]
+SLIDER_N_TIP=jquery=fieldset:eq(0) > div > table:eq({0}) div[id$=Tip]
+SLIDER_N_INPUT=jquery=fieldset:eq(0) > div > table:eq({0}) input[id$=Input]
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spinner/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spinner/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/spinner/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,7 +1,7 @@
-EXAMPLE_HEADER=//fieldset/legend
-UPPER_SPINNER_INPUT=//fieldset/div/form/table[1]/tbody/tr/td[1]/input
-UPPER_SPINNER_UP=//fieldset/div/form/table[1]/tbody/tr/td[2]/table/tbody/tr[1]/td/input
-UPPER_SPINNER_DOWN=//fieldset/div/form/table[1]/tbody/tr/td[2]/table/tbody/tr[2]/td/input
-LOWER_SPINNER_INPUT=//fieldset/div/form/table[2]/tbody/tr/td[1]/input
-LOWER_SPINNER_UP=//fieldset/div/form/table[2]/tbody/tr/td[2]/table/tbody/tr[1]/td/input
-LOWER_SPINNER_DOWN=//fieldset/div/form/table[2]/tbody/tr/td[2]/table/tbody/tr[2]/td/input
\ No newline at end of file
+EXAMPLE_HEADER=jquery=fieldset:eq(0) > legend
+UPPER_SPINNER_INPUT=jquery=fieldset:eq(0) form > table:eq(0) input.rich-spinner-input
+UPPER_SPINNER_UP=jquery=fieldset:eq(0) form > table:eq(0)
input.rich-spinner-button:eq(0)
+UPPER_SPINNER_DOWN=jquery=fieldset:eq(0) form > table:eq(0)
input.rich-spinner-button:eq(1)
+LOWER_SPINNER_INPUT=jquery=fieldset:eq(0) form > table:eq(1) input.rich-spinner-input
+LOWER_SPINNER_UP=jquery=fieldset:eq(0) form > table:eq(1)
input.rich-spinner-button:eq(0)
+LOWER_SPINNER_DOWN=jquery=fieldset:eq(0) form > table:eq(1)
input.rich-spinner-button:eq(1)
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/suggestionBox/locators.properties
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/suggestionBox/locators.properties 2009-10-29
11:00:26 UTC (rev 15773)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/resources/org/jboss/richfaces/integrationTest/suggestionBox/locators.properties 2009-10-29
11:22:08 UTC (rev 15774)
@@ -1,24 +1,24 @@
-FIRST_SUGGESTION_BOX_PREFORMATTED=//table[@id='suggestionbox_form:suggestionBoxId:suggest']/tbody/tr[{0}]
+FIRST_SUGGESTION_BOX_PREFORMATTED=jquery=table[id$=suggest].rich-sb-int-decor-table
tr:eq({0})
-FIRST_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/input[1]
-FIRST_BORDER_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[1]/td[2]/table/tbody/tr[1]/td[3]/input
-FIRST_WIDTH_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[2]/td[2]/table/tbody/tr[1]/td[3]/input
-FIRST_HEIGHT_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[3]/td[2]/table/tbody/tr[1]/td[3]/input
-FIRST_SHADOW_DEPTH_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[4]/td[2]/table/tbody/tr[1]/td[3]/input
-FIRST_SHADOW_OPACITY_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[5]/td[2]/table/tbody/tr[1]/td[3]/input
-FIRST_CELLPADDING_INPUT=//fieldset[1]/div/form/table/tbody/tr/td[1]/table/tbody/tr[6]/td[2]/table/tbody/tr[1]/td[3]/input
+FIRST_INPUT=jquery=fieldset:eq(0) input[id$=text]
+FIRST_BORDER_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody >
tr:eq(0) > td:eq(1) input
+FIRST_WIDTH_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody >
tr:eq(1) > td:eq(1) input
+FIRST_HEIGHT_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody >
tr:eq(2) > td:eq(1) input
+FIRST_SHADOW_DEPTH_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody
> tr:eq(3) > td:eq(1) input
+FIRST_SHADOW_OPACITY_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody
> tr:eq(4) > td:eq(1) input
+FIRST_CELLPADDING_INPUT=jquery=fieldset:eq(0) td.sb_test_column1 > table > tbody
> tr:eq(5) > td:eq(1) input
-FIRST_TOWN_TABLE_PREFORMATTED=//fieldset[1]/div/form/table/tbody/tr/td[2]/div/table/tbody/tr[{0}]/td[{1}]
+FIRST_TOWN_TABLE_PREFORMATTED=jquery=fieldset:eq(0) td.sb_test_column2 div#myDiv
tr:eq({0}) > td:eq({1})
-FIRST_BORDER_STYLE=//div[@id='suggestionbox_form:suggestionBoxId']/div[1]/div@style
-FIRST_WIDTH_STYLE=//div[@id='suggestionbox_form:suggestionBoxId']@style
-FIRST_HEIGHT_STYLE=//div[@id='suggestionbox_form:suggestionBoxId']@style
-FIRST_SHADOW_DEPTH_STYLE=//div[@id='suggestionbox_form:suggestionBoxId']/div[2]@style
-FIRST_SHADOW_OPACITY_STYLE=//div[@id='suggestionbox_form:suggestionBoxId']/div[2]@style
-FIRST_CELLPADDING=//div[@id='suggestionbox_form:suggestionBoxId']/div[1]/div/table/tbody/tr/td/div/table@cellpadding
+FIRST_BORDER_STYLE=jquery=div[id$=suggestionBoxId] div.rich-sb-ext-decor-2@style
+FIRST_WIDTH_STYLE=jquery=div[id$=suggestionBoxId]@style
+FIRST_HEIGHT_STYLE=jquery=div[id$=suggestionBoxId]@style
+FIRST_SHADOW_DEPTH_STYLE=jquery=div[id$=suggestionBoxId] > div:eq(1)@style
+FIRST_SHADOW_OPACITY_STYLE=jquery=div[id$=suggestionBoxId] > div:eq(1)@style
+FIRST_CELLPADDING=jquery=div[id$=suggestionBoxId] table[id$=suggest]@cellpadding
-SECOND_INPUT=//fieldset[2]/div/form/table/tbody/tr[1]/td[2]/table/tbody/tr/td[1]/input
-SECOND_BUTTON=//fieldset[2]/div/form/table/tbody/tr[1]/td[2]/table/tbody/tr/td[2]/img
-SECOND_SUGGESTION_LINES=//div[@id='form:suggestion']/div[1]/div/table/tbody/tr/td/div/table/tbody/tr
-SECOND_SUGGESTION_BOX_PREFORMATTED=//div[@id='form:suggestion']/div[1]/div/table/tbody/tr/td/div/table/tbody/tr[{0}]
-SECOND_STATE=//fieldset[2]/div/form/table/tbody/tr[2]/td[2]/span
+SECOND_INPUT=jquery=fieldset:eq(1) input[id$=statesinput]
+SECOND_BUTTON=jquery=fieldset:eq(1) img[src*=arrow.png]
+SECOND_SUGGESTION_LINES=jquery=div[id$=suggestion] table[id$=suggest] tr
+SECOND_SUGGESTION_BOX_PREFORMATTED=jquery=div[id$=suggestion] table[id$=suggest]
tr:eq({0})
+SECOND_STATE=jquery=fieldset:eq(1) span[id$=objects]