diikee Posted June 18, 2008 Share Posted June 18, 2008 (edited) expandcollapse popup$gs = _IETagNameGetCollection ($oIE, "select") For $g In $gs If ($g.name) = "gainStyle" then $gopt = _IETagNameGetCollection($g, "OPTION") For $gop in $gopt Sleep(2000) ConsoleWrite($g.name & " Type: " & $gop.innerText & @CRLF) ;MsgBox(0, "Selection Values", "Name: " & $oInput.name & " Type: " & $op.innerText) FileWrite($file, "Gain style: " & $g.name & " Type: " & $gop.innerText & @CRLF) Global $o = $gop.innerText ConsoleWrite("Gain style set to: " & $o & @CRLF) _IEFormElementOptionselect($g, $o, 1, "byText") FileWrite($file, "Gain style set to: " & $o & @CRLF) ;#cs Sleep(2000) _IENavigate($oIE, &$ip "/get.oid?1.2.8.14") Sleep(3000) ;ConsoleWrite("Got Here1" & @CRLF) $oid = _IEAttach(&$ip "/get.oid?1.2.8.14","URL") Sleep(1000) $gm = _IETagNameGetCollection($oid, "PRE") Sleep(1000) For $g in $gm $id = $g.innerText ;ConsoleWrite("Got Here2" & @CRLF) ConsoleWrite("GainStyle is set to: " & $id & @CRLF) ;ExitLoop Next If $id = & $o Then --------------------------->>>This is where it doesn't evaluate $o ConsoleWrite("GainStyle set successfully" & @CRLF) Else ConsoleWrite("GainStyle set test failed" & @CRLF) EndIf ;#ce Next ExitLoop EndIf Next Sleep(3000)C:\autoit\IQSQA_Test.au3 (803) : ==> Error in expression.:If $id = & $o ThenIf ^ ERRORhow do I compare the value that was set before navigating to another page with was is on the current page??? Edited June 18, 2008 by diikee Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 18, 2008 Share Posted June 18, 2008 C:\autoit\IQSQA_Test.au3 (803) : ==> Error in expression.: If $id = & $o Then If ^ ERROR how do I compare the value that was set before navigating to another page with was is on the current page??? What's with the stray ampersand? Try just this: If $id = $o Then Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
diikee Posted June 18, 2008 Author Share Posted June 18, 2008 Tried that already.... problem is I am navigating to a page which returns the value $id how can I save the value $o which is way before I navigate to that other page?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 18, 2008 Share Posted June 18, 2008 Tried that already.... problem is I am navigating to a page which returns the value $id how can I save the value $o which is way before I navigate to that other page?? Well, you set it inside the loop with this line: Global $o = $gop.innerText If you need to keep track of it outside the loop, save it somewhere else...? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now