rSource is set to the value of cell A1, which contains a number.
The next part of my code opens up a website and enters rSource into field 'num' which is just a input box. The button is then clicked, which causes the website to calculate the square root of the number entered before displaying it in the box 'answer'.
The problem with my code seems to be this line:
variableName = driver.findElementByName("answer").getAttribute("value")
What I want is to grab the attribute of 'answer' which will be the square root of the number I entered earlier, and then paste it into cell A2.
I've noticed for one thing that getAttribute doesn't seem to be the same as 'copying', as when I try to manually paste into a cell I never get 'answer'. What I was hoping to do was somehow 'copy' that value, and then use something like ' Worksheets("Sheet1").Range("A2").PasteSpecial' to then paste 'answer' into cell A2... Though after a ton of playing around I can't seem to get it to work. Any help would be much appreciated.
The above code was created using Selenium, which I then modified using VBA.
selenium SendKeysfor this? Highlighting is possible with Selenium. On the other hand, if you really need it to come from the clipboard, theClipboardobject is a good alternative.