偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Ruby關(guān)閉IE進(jìn)程采用直接關(guān)閉進(jìn)程法

開發(fā) 開發(fā)工具
Ruby關(guān)閉IE進(jìn)程再實(shí)際應(yīng)用中是經(jīng)常會遇到的問題。對于剛剛接觸Ruby語言的朋友來說可能還對其不是太了解。希望通過我們的介紹大家可以充分掌握這一技巧的應(yīng)用。

Ruby語言的實(shí)際是代碼編寫中,我們會覺得它的編寫方式不同于其他語言,并且在編寫代碼時會有一種非常愉悅的心情。在這里我們就為大家介紹一下Ruby關(guān)閉IE進(jìn)程的相關(guān)方法。#t#

使用watir的close_all方法,有時會關(guān)閉不掉IE,***的Ruby關(guān)閉IE進(jìn)程辦法就是直接終止IE進(jìn)程,可以寫一個關(guān)閉ie的方法

 

 

  1. require 'win32ole'  
  2. # Returns the number 
    of windows
     processes running with
     the specified name.  
  3. def close_ie  
  4. mgmt = WIN32OLE.connect
    ('winmgmts:\\\\.')  
  5. processes=mgmt.
    instancesof("win32_process")  
  6. processes.each do |process|  
  7. puts process  
  8. if process.name ==
    "iexplore.exe" then   
  9. process.terminate()  
  10. end  
  11. end  
  12. end  

 

這樣調(diào)用close_ie方法時就可以實(shí)現(xiàn)Ruby關(guān)閉IE進(jìn)程了。

責(zé)任編輯:曹凱 來源: 博客園
相關(guān)推薦

2009-08-28 10:26:40

Windows 7系統(tǒng)故障應(yīng)對IE進(jìn)程無法關(guān)閉

2011-04-07 09:40:57

DataReader鏈接關(guān)閉

2010-05-10 17:00:53

Oracle死鎖進(jìn)程

2010-04-14 13:20:29

Unix操作系統(tǒng)

2010-05-07 10:28:52

Linux系統(tǒng)

2017-03-28 14:00:06

Windows 10Windows系統(tǒng)進(jìn)程

2010-03-03 16:53:23

ubuntu系統(tǒng)過慢

2010-04-01 17:25:46

Oracle死鎖進(jìn)程

2009-12-16 10:10:16

Ruby打開關(guān)閉文件

2022-01-14 23:44:57

電腦進(jìn)程設(shè)置

2021-05-06 13:45:13

PythonExce彈窗

2021-10-15 22:17:08

Windows 10Windows微軟

2009-03-11 18:30:15

Windows 7關(guān)閉功能

2021-08-04 16:36:00

Windows 10Windows微軟

2025-02-17 03:00:00

WinForm應(yīng)用程序線程

2009-03-10 19:04:50

微軟IE8瀏覽器

2025-03-11 00:55:00

Spring停機(jī)安全

2023-01-30 07:41:43

2010-02-25 10:28:43

Linux進(jìn)程管理

2009-02-19 16:57:51

IE8新特性保護(hù)模式
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號