Skip to content

Commit 4268856

Browse files
committed
Fixed localization values for ComboBox
1 parent 3e72f13 commit 4268856

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/main/java/aquality/appium/mobile/elements/ComboBox.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
public class ComboBox extends Element implements IComboBox {
1919

20-
private static final String LOG_SELECTING_VALUE = "loc.selecting.value";
20+
private static final String LOG_SELECTING_VALUE = "loc.combobox.select.by.value";
2121

2222
protected ComboBox(final By locator, final String name, final ElementState state) {
2323
super(locator, name, state);
@@ -29,7 +29,7 @@ protected String getElementType() {
2929

3030
@Override
3131
public void selectByIndex(int index) {
32-
logElementAction(LOG_SELECTING_VALUE);
32+
logElementAction(LOG_SELECTING_VALUE, String.format("#%d", index));
3333
doWithRetry(() -> new Select(getElement()).selectByIndex(index));
3434
}
3535

@@ -40,22 +40,22 @@ public void selectByText(String value) {
4040
}
4141

4242
@Override
43-
public void clickAndSelectByText(String value) {
43+
public void clickAndSelectByText(String text) {
4444
click();
45-
selectByText(value);
45+
selectByText(text);
4646
}
4747

4848
@Override
4949
public void selectByContainingText(String text) {
50-
logElementAction(LOG_SELECTING_VALUE);
50+
logElementAction(LOG_SELECTING_VALUE, text);
5151
selectOptionThatContains(WebElement::getText,
5252
Select::selectByVisibleText,
5353
text);
5454
}
5555

5656
@Override
5757
public void selectByContainingValue(String value) {
58-
logElementAction(LOG_SELECTING_VALUE);
58+
logElementAction(LOG_SELECTING_VALUE, value);
5959
selectOptionThatContains(element -> element.getAttribute(Attributes.VALUE.toString()),
6060
Select::selectByValue,
6161
value);
@@ -83,7 +83,7 @@ private void selectOptionThatContains(Function<WebElement, String> getValueFunc,
8383

8484
@Override
8585
public void selectByValue(String value) {
86-
logElementAction(LOG_SELECTING_VALUE);
86+
logElementAction(LOG_SELECTING_VALUE, value);
8787
doWithRetry(() -> new Select(getElement()).selectByValue(value));
8888
}
8989

src/main/java/aquality/appium/mobile/elements/interfaces/IComboBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public interface IComboBox extends IElement {
2020
/**
2121
* Open Dropdown and select by visible text
2222
*
23-
* @param value text to be selected
23+
* @param text text to be selected
2424
*/
25-
void clickAndSelectByText(String value);
25+
void clickAndSelectByText(String text);
2626

2727
/**
2828
* Select by containing visible text

src/main/java/aquality/appium/mobile/elements/interfaces/ITextBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public interface ITextBox extends IElement {
99
void type(String value);
1010

1111
/**
12-
* Enter the text in the box, inputted value isn't logging
12+
* Enter the text in the box, inputted value isn't logged
1313
*
1414
* @param value text
1515
*/
@@ -28,7 +28,7 @@ public interface ITextBox extends IElement {
2828
void clearAndType(String value);
2929

3030
/**
31-
* Clears input and enters text in the box, inputted value isn't logging
31+
* Clears input and enters text in the box, inputted value isn't logged
3232
*
3333
* @param value text
3434
*/

src/main/resources/localization/be.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"loc.checkbox.get.state": "Атрымліваем стан",
2121
"loc.combobox": "Камбабокс",
2222
"loc.combobox.select.by.text" : "Выбіраем значэнне з тэкстам '%s'",
23+
"loc.combobox.select.by.value" : "Выбіраем значэнне '%s'",
2324
"loc.combobox.get.texts": "Атрымліваем спіс тэкстаў опцыяў",
2425
"loc.combobox.get.values" : "Атрымліваем спіс значэнняў",
2526
"loc.combobox.impossible.to.select.contain.value.or.text" : "Немагчыма выбраць опцыю, якая змяшчае значэнне/тэкст '%1$s' у камбабоксе '%2$s'",
@@ -28,7 +29,6 @@
2829
"loc.label" : "Надпіс",
2930
"loc.link" : "Спасылка",
3031
"loc.radio" : "Радыёкнопка",
31-
"loc.selecting.value" : "Выбіраем значэнне",
3232
"loc.send.text" : "Задаем тэкст - '%s'",
3333
"loc.setting.value" : "Задаем значэнне '%s'",
3434
"loc.text.clearing" : "Ачышчаем",

src/main/resources/localization/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"loc.checkbox.get.state": "Getting state",
2121
"loc.combobox": "ComboBox",
2222
"loc.combobox.select.by.text": "Selecting value by text '%s'",
23+
"loc.combobox.select.by.value": "Selecting value '%s'",
2324
"loc.combobox.get.texts": "Getting option texts array",
2425
"loc.combobox.get.values": "Getting values array",
2526
"loc.combobox.impossible.to.select.contain.value.or.text": "It is impossible to select option that contains value/text '%1$s' from combobox '%2$s'",
@@ -28,9 +29,8 @@
2829
"loc.label": "Label",
2930
"loc.link": "Link",
3031
"loc.radio": "Radiobutton",
31-
"loc.selecting.value": "Selecting value",
3232
"loc.send.text": "Setting text - '%s'",
33-
"loc.setting.value": "Setting value",
33+
"loc.setting.value": "Setting value '%s'",
3434
"loc.text.clearing": "Clearing",
3535
"loc.text.field": "Text Field",
3636
"loc.text.typing": "Typing '%s'",

src/main/resources/localization/ru.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"loc.checkbox.get.state": "Получение состояния",
2121
"loc.combobox": "Комбобокс",
2222
"loc.combobox.select.by.text": "Выбор значения с текстом '%s'",
23+
"loc.combobox.select.by.value": "Выбор значения '%s'",
2324
"loc.combobox.get.texts": "Получение списка текстов опций",
2425
"loc.combobox.get.values": "Получение списка значений",
2526
"loc.combobox.impossible.to.select.contain.value.or.text": "Не удаётся выбрать значение которое содержит значение/текст '%1$s' в выпадающем списке '%2$s'",
@@ -28,9 +29,8 @@
2829
"loc.label": "Надпись",
2930
"loc.link": "Ссылка",
3031
"loc.radio": "Радиокнопка",
31-
"loc.selecting.value": "Выбор значения",
3232
"loc.send.text": "Ввод текста - '%s'",
33-
"loc.setting.value": "Установка значения",
33+
"loc.setting.value": "Установка значения '%s'",
3434
"loc.text.clearing": "Очистка",
3535
"loc.text.field": "Текстовое поле",
3636
"loc.text.typing": "Ввод текста '%s'",

0 commit comments

Comments
 (0)