How to enter an Integer in a table cell

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to enter an Integer in a table cell

Neftali G Reyes
I have my cell element:  IWebElement cell = tdElements[colIndex];

How to enter an integer r double into the cell.

I have read that you have to use the IJavaScriptExecutor.  However, everything seems to point to having to pass a locator to the script.   I already have the cell, how to pass a number to it.  The inner text of the cell doesn't take a string.


Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7f4f5c84-94e9-4e87-9617-9bb1eade4e18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to enter an Integer in a table cell

Neftali G Reyes
I'm using c#

On Tuesday, April 17, 2018 at 2:00:28 PM UTC-5, Attila wrote:
I have my cell element:  IWebElement cell = tdElements[colIndex];

How to enter an integer r double into the cell.

I have read that you have to use the IJavaScriptExecutor.  However, everything seems to point to having to pass a locator to the script.   I already have the cell, how to pass a number to it.  The inner text of the cell doesn't take a string.


Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cd5cc3c4-6729-4f99-8ec5-2d8e9555a774%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to enter an Integer in a table cell

Neftali G Reyes
Boy! replies are slow on this site.  I resolved my problem.  The cell I needed to alter was really a div inside of a cell.  I couldn't see the div until I double-clicked on the cell.  So to resolve my problem:
1- I found the cell
2- I moved to cell and double-clicked with an action
3- I discover and find the div
4- I click on the div
5- I clear the div
6- I send string to the div
7- i send the Enter key to div to store the value in server (this is needed in my application)
8- released action

PS: Strings and Integers were accepted since conversion is done at the server.



On Tuesday, April 17, 2018 at 7:05:36 PM UTC-5, Attila wrote:
I'm using c#

On Tuesday, April 17, 2018 at 2:00:28 PM UTC-5, Attila wrote:
I have my cell element:  IWebElement cell = tdElements[colIndex];

How to enter an integer r double into the cell.

I have read that you have to use the IJavaScriptExecutor.  However, everything seems to point to having to pass a locator to the script.   I already have the cell, how to pass a number to it.  The inner text of the cell doesn't take a string.


Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2c5ad90a-2960-42cd-8950-f8e540836ec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.