I want to fill information such as name, surname, etc. in the empty columns with Selenium according to the student numbers drawn from Excel to DataGridView. However, I'm stuck getting data into empty columns. Is there anyone who can help with this?
var val2 = drv.FindElement(By.Id("txtAdi")).GetAttribute("value");
val2 = dataGridView1.Rows[i].Cells[1].Value.ToString(); // datagridview cell to which I want to assign val2 data. I want to solve this line.
Mehmet FatihPosted Jan 4, 2024, 3:56 PM
Thank you Amit. Your code works fine. I made a mistake while executing your code. I'm sorry it didn't work well for that reason.
Mehmet FatihPosted Jan 4, 2024, 2:33 PM
No, I am not getting any error. But It doesn't insert val2 value to the datagridview cell.
Amit MohantyPosted Jan 4, 2024, 1:29 PM
Are you getting any error, Mehmet? Can you verify that val2 holds the expected data by debugging.
Mehmet FatihPosted Jan 4, 2024, 1:04 PM
Thanks for your intrest, Amit. But I have tried id before. But it doesn't work. I can't assign val2 data to datagrdview.
Amit MohantyPosted Jan 4, 2024, 12:27 PM
Try this: