Skip to content

I want stop firefox when max size its over Task Manager #159

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
Operating system and version (32/64bit) : Win 8.1 x64
.Net Framework version : 4.0
Office name and version(32/64bit) : 2015 x64
Browser name and version : firefox (32)
SeleniumWrapper version : 1.0.23.0

What steps will reproduce the problem with a public website ?
1. I open website and use it
Set SeWD_ff = New SeleniumWrapper.WebDriver
SeWD_ff.Start "firefox", "http://uk.news.yahoo.com"
SeWD_ff.setImplicitWait 5000
SeWD_ff.Open "opinion"

2.a moment later
hwnds = SeWD_ff.WindowHandles
for each hnd in hwnds
   if hnd.WorkingSetSize > 250000 then
      hnd.stop
      exit for
   end if
next

So, Where do I read [hwnd.WorkingSetSize]? How?

p/s:I can use code below to Kill Process but not good.
For Each Process In GetObject("winmgmts:").ExecQuery("Select Name from 
Win32_Process Where Name = '" & "firefox.exe" & "'")
   Process.Terminate
Next Process

And if,
            SeWD_ff.WindowHandle = {0a8b6271-5859-47b6-9262-4d75cbfd6751}
Then, 
            GetObject("winmgmts:").get( "Win32_Process.WindowHandle='" & _
                           SeWD_ff.WindowHandle & "'").WorkingSetSize
it do not working.

Answer me as soon as possible, I wait for your letter.

Original issue reported on code.google.com by [email protected] on 2 Jun 2015 at 5:19

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions