I am developing on a program in C# that automates inputting information into a website. This program uses a library (Coypu) that allows this and for the execution of Javascript to manipulate further.
The problem comes in two forms:
- The website only uses names (not ids) for its objects and I must use IE8 for them. Therefore I cannot use
document.getElementsByName('name');
because it's not supported in earlier versions of IE. - I found a workaround by utilizing the form that's on the site but am having trouble using it because the site has to click a link to create a second tab for itself, leaving me helpless in grabbing the form in the second tab. Using something like
document.forms[formIndex].elements['elementsName'];
(although the tab appears to have focus) only gives me the forms from the main tab.
Has anyone ever fixed this problem or found a workaround in Javascript? Also, I'm not sure if jQuery can be used in my scenario as the Javascript is a string passed in to a C# method. However, it may or may not work.