Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Click on IE10 tools --> f12 --> Comaptaibilty view to IE8
#1
Not Solved
Hi,
I have to open a IE session thne click on tools --> F12 and then change the setting to Comaptability mode ie 8.

Recorder below code but its not working.

Can you please help with DP.

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","%HOMEDRIVE%%HOMEPATH%",""
Browser("Internet Explorer Enhanced").WinToolbar("ToolbarWindow32").Press "&Tools"
Browser("Internet Explorer Enhanced").WinMenu("ContextMenu").Select "F12 developer tools"
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","%HOMEDRIVE%%HOMEPATH%",""
Browser("Internet Explorer Enhanced").Page("Internet Explorer Enhanced").Sync
Reply
#2
Not Solved
You got to use Shell Scripting as part of your VB Script and below is the code

In the below code for the following line 1 is to Enable and 0 is to Disable "oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,1"

Code:
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation"
strValueName = "MSCompatibilityMode"
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,1
If Err = 0 Then
   oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
   WScript.Echo "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation\MSCompatibilityMode"& "contains " & dwValue
Else
   WScript.Echo "Error in creating key" & " and DWORD value = " & Err.Number
End If
Reply
#3
Not Solved
Thanks Kamal:

I tried executing this on my box but still it showing view as IE10 , not changed to IE8.

Executed as test.vbs and test.bat file.

Apart from This I tried code like below , it press f12 but I donbt know how to click compatible view and select IE8.

Code:
Set WshShell = CreateObject("WScript.Shell")
        While Window("Developer Tools").Exist(2) = False
            Browser("micclass:=Browser").Page("micclass:=Page").SetTOProperty "focus", True
            WshShell.AppActivate "Internet Explorer"
            WshShell.SendKeys("{F12}")
            Wait(2)    
        Wend

        WshShell.AppActivate "Developer Tools"
        WshShell.SendKeys("%c")
        Wait(2)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question what is the shortcut key used to switch between keyword view and expert view in qtp. shaileshanand86 5 11,232 02-13-2019, 03:58 AM
Last Post: zia003
  Unable to view cursor during run swathiG 1 4,536 08-31-2012, 11:29 AM
Last Post: Sathiya
  QTP crash in Keyword view mufiani 3 4,282 12-08-2010, 12:19 PM
Last Post: manishbhalshankar
  QTP does not identify the IE menus like Tools, File, Edit and e.t.c komila_srivastava 1 2,714 05-03-2009, 09:45 PM
Last Post: tmcken
  view child objects arun2kindia 1 2,929 12-21-2008, 09:37 PM
Last Post: sreekanth chilam

Forum Jump:


Users browsing this thread: 1 Guest(s)