| || |
Fields that are formatted using DNN
I'm writing a Selenium script to test registration. The application is written using .Net Nuke (DNN). I'm having trouble with a pre-formatted field for phone number (starts off with a format of 1-(___)-___ -____ ). Below is the IDE recorded format of the code. Everytime I try to submit the form it's informing me that the phone field is not valid, even though I can manually enter the information.
I've tried leaving out all symbols, making it just 11234567890 or just leaving out the parenthesis () and just leaving out the hyphens - .
Let me know your thoughts, and thanks in advance!
Re: Fields that are formatted using DNN
Alright. After working with this some more and using the IDE for some troubleshooting, I figured out a fix...it's not pretty but it's what I had to do. Below is my function I created.
public void writePhone(String phoneNumber, String field)
char arr = phoneNumber.ToCharArray();
int j = 0;
for (int i = 3; i < 16; i++)
i = i + 2;
Console.WriteLine("Case 6: i's value is " + i);
i = i + 1;
Console.WriteLine("Case 11: i's value is " + i);
Console.WriteLine("Defaulted: i's value is " + i);
Console.WriteLine("J is " + arr[j]);
j = j + 1;