2015年10月6日 星期二

windows10 WOL失效問題

關於升級到windows10之後wake on lan失效問題,請到下面連結下載Win10 Auto Installation Program的realtek driver,安裝之後問題解決,也不用像其他資料寫得要改green ethernet或者windows10的fast boot。

http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#1

參考資料
https://m.reddit.com/r/Windows10/comments/3f73sz/psaif_windows_10_killed_your_wol_functionality_or/

2015年10月5日 星期一

Windows server 無法下載檔案問題

前一陣子試用windows server2012,發現用IE無法下載網路上的檔案,後來發現要把IE進階安全設定關閉才行。

參考資料

google sheet array串接

googlesheet如果需要將兩個array串成一個array時,使用{array1;array2}的格式。

參考資料
忘了留

XFCE自動完成失效問題

在XFCE下ubuntu的tab自動完成失效,解決方法是修改xml file

.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
把下面改掉
<property name=”&lt;Super&gt;Tab” type=”string” value=”switch_window_key”/>
改成這個
<property name=”&lt;Super&gt;Tab” type=”empty”/>

參考資料
https://241931348f64b1d1.wordpress.com/2012/05/04/shell-autocomplete-not-working-on-xrdp-xubuntu-12-04-xfce/

selenium

selenium get url of webpage
selenium2library 可以使用 keyword "Get Location"

另外Get Element Attribute 需要使用id name@class而非一般XPATH格式否則會有錯誤

The expression is not a legal expression

而使用Get Value獲取@href不行因為結果會是attribute而非element,會有錯誤

[object XrayWrapper [object Attr]]

當需要驗證popup windows兩者標題又相同無法switch window時,後來採取抓取button href資訊並直接go to就可以不被popup限制

參考資料
自己
http://stackoverflow.com/questions/15985339/how-do-i-get-current-url-in-selenium-webdriver-2-python

rebot

robotframework 可以使用 rebot <file1>.xml <file2>.xml來合併xml,並且合併之後log.html與report.html也會跟著update

可使用參數--name <name>來變更suite name

如用Windows寫sh script時要注意檔案格式需為UNIX,否則可能有執行上問題,錯誤訊息
' failed: Data source does not exist.Appengine/X3000001.robot

Try --help for usage information.
: not found3: script.sh:
參考資料
https://twiki.cern.ch/twiki/bin/view/EMI/RobotFrameworkAdvancedGuide#Using_the_rebot_Tool
http://stackoverflow.com/questions/25988071/combining-robot-framework-test-reports

ddwrt設定wake on lan

由於無法NAT layer-2 broadcast,所以必須使用wake on internet (255.255.255.255)發送packet NAT到主機ip並寫入arp table使得router不須透過arp request取得ip的mac address。由於arp table會在重開機時清除所以使用指令arp -s <ip> <mac>並使用cron定時寫入防止遇到device重開機。

cron指令詳如下

*/20 * * * * arp -s <ip> <mac> 代表每3分鐘寫入一次

參考資料