Set value for an input field in a table

I need to add a value to a cell in a table. I have code to look for the cell and click in it, but I am unable to set a value into that field, as I dont see an option to do that. I am attaching the code that I have for it so far. Can someone help me with setting the value into this field?

		for (int column = 0; column < columns_count; column++) {
			'elements with class of span, from each cell'
			List<WebElement> divspanElements = Columns_row.get(column).findElements(By.tagName('span'))
			int divspanElements_count = divspanElements.size()
			for (int divSpan = 0; divSpan < divspanElements_count; divSpan++) {
				List<WebElement> divinputElements = Columns_row.get(column).findElements(By.tagName('input'))					
				int divinputElements_count = divinputElements.size()
				for (int divInput = 0; divInput < divinputElements_count; divInput++) {

Hi @mridula.palivela,

Based on my understanding, you just need to set a text on that field…

I notice you are not using the index of the array, you need to use that.

You can try this…

Hope that helps. . . :slight_smile:

Thanks Arnel!

I just noticed and tried Send keys and it is working now. The index is set using get(divInput). I will try giving the index directly in divInputElements and see if that works too.