Type a {@code text} on an numbered {@code index} previously found element.

@param text
@param index
194000
@When("^I type '(.+?)' on the element on index '(\\d+?)'$")
    public void seleniumType(@Transform(NullableStringConverter.class) String text, Integer index) {
        assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required")
                .hasAtLeast(index);
        while (text.length() > 0) {
            Actions actions = new Actions(commonspec.getDriver());
            if (-1 == text.indexOf("\\n")) {
                actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));
                actions.click();
                actions.sendKeys(text);
                actions.build().perform();
                text = "";
            } else {
                actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));
                actions.click();
                actions.sendKeys(text.substring(0, text.indexOf("\\n")));
                actions.build().perform();
                text = text.substring(text.indexOf("\\n") + 2);
            }
        }
    }
549314
@When("^I delete the text '(.+?)' on the element on index '(\\d+?)'( and replace it for '(.+?)')?$")
    public void seleniumDelete(String text, Integer index, String foo, String replacement) {
        assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required")
                .hasAtLeast(index);

        Actions actions = new Actions(commonspec.getDriver());
        actions.moveToElement(commonspec.getPreviousWebElements().getPreviousWebElements().get(index), (text.length() / 2), 0);
        for (int i = 0; i < (text.length() / 2); i++) {
            actions.sendKeys(Keys.ARROW_LEFT);
            actions.build().perform();
        }
        for (int i = 0; i < text.length(); i++) {
            actions.sendKeys(Keys.DELETE);
            actions.build().perform();
        }
        if (replacement != null && replacement.length() != 0) {
            actions.sendKeys(replacement);
            actions.build().perform();
        }
    }
463087
public void setAdditionalText(String text) {

        if (CmsStringUtil.isEmpty(text)) {
            m_additionalText.setVisible(false);
        } else {
            m_additionalText.setValue(text);
            m_additionalText.setVisible(true);
        }
    }
216603
public void setText(final String TEXT) {
        if (null == text) {
            _text = TEXT;
            fireSectionEvent(UPDATE_EVENT);
        } else {
            text.set(TEXT);
        }
    }
536788
public void setText(String text)
	{
		if (this.filterFunction != null)
			text = this.filterFunction.apply(text);

		if (text == null)
			text = "";
		this.text.setLength(0);
		this.text.append(text);
		guiText.setText(text);

		selectingText = false;
		xOffset = 0;
		if (focused)
			cursor.jumpToEnd();
		// fireEvent(new TextChanged(this));
	}
495635
@Override
	public void addText(String text)
	{
		if (selectingText)
			deleteSelectedText();

		final StringBuilder oldText = this.password;
		final String oldValue = oldText.toString();
		String newValue = oldText.insert(this.cursor.index, text).toString();

		if (this.filterFunction != null)
			newValue = this.filterFunction.apply(newValue);

		if (!fireEvent(new ComponentEvent.ValueChange<>(this, oldValue, newValue)))
			return;

		this.password = new StringBuilder(newValue);
		this.updateText();
		this.cursor.jumpBy(text.length());
	}
477571
public static CharSequence getAt(CharSequence text, int index) {
        index = normaliseIndex(index, text.length());
        return text.subSequence(index, index + 1);
    }
850276
public void setEnterpriseText(int index, String value)
   {
      set(selectField(AssignmentFieldLists.ENTERPRISE_TEXT, index), value);
   }
1061524
public synchronized void setText(String text) {
        setLines(splitIntoMultipleLines(text));
        this.labelSize = getBounds(lines, labelSize);
        invalidate();
    }
591322
public void setAsText(final String text) {
        if (BeanUtils.isNull(text)) {
            setValue(null);
            return;
        }
        try {
            Object newValue = Short.decode(text);
            setValue(newValue);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException("Failed to parse short.", e);
        }
    }
422064
public SelectStep text(String text) {
		return new SelectStep(element, text, SelectStep.OptionSelectorType.TEXT);
	}
1026544
public static int nthIndexOf(final String string, final String token,
            final int index)
   {
      int j = 0;

      for (int i = 0; i < index; i++)
      {
         j = string.indexOf(token, j + 1);
         if (j == -1)
            break;
      }

      return j;
   }
173416
public void setSearchText(String searchText) {
        if (TextUtils.isEmpty(searchText)) {
            searchText = null;
        }
        this.searchText = searchText;
        if (this.searchBox != null) {
            this.searchBox.setText(searchText);
        }
    }
28677
@Then("^the element on index '(\\d+?)' has '(.+?)' as text$")
    public void assertSeleniumTextOnElementPresent(Integer index, String text) {
        assertThat(commonspec.getPreviousWebElements()).as("There are less found elements than required")
                .hasAtLeast(index);
        String elementText = commonspec.getPreviousWebElements().getPreviousWebElements().get(index).getText().replace("\n", " ").replace("\r", " ");
        if (!elementText.startsWith("regex:")) {
            //We are verifying that a web element contains a string
            assertThat(elementText.matches("(.*)" + text + "(.*)")).isTrue();
        } else {
            //We are verifying that a web element contains a regex
            assertThat(elementText.matches(text.substring(text.indexOf("regex:") + 6, text.length()))).isTrue();
        }
    }
302651
public void write(final AbstractIndex index)
		throws IOException
	{

		StringBuilder cmd;

		while (index.size() > 0) {

			System.out.println("Transmit Index [" + index + "]");

			cmd = index.remove();
			// System.out.println(cmd.toString());

			cmd.append("\r\n");
			writer.write(cmd.toString());
		}

		writer.flush();
	}
196423
public void setTabText(int index, String text) {
        TextView tv = (TextView) mTabTitleViews.get(index);

        if (tv != null) {
            tv.setText(text);
        }
    }
130688
public final void setBackButtonText(@NonNull final CharSequence text) {
        Condition.INSTANCE.ensureNotNull(text, "The text may not be null");
        Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty");
        this.backButtonText = text;
        adaptBackButtonText();
    }