60周年!!!!!举国同庆!!
60周年!!!!!举国同庆!!
转贴一个高人的QTP笔记供大家学习。
文章比较长,一共三部分:
1、连接数据库查询例子,无参数化
//查询收文操作,通过数据库查询记录数是否正确
//1、输出记录数值,例如78条 2、获取输出的记录数值 3、连接数据库,查询记录数
4、输出记录数值和从数据库中查询记录数值,相比较,相等则成功,不等则失败
Browser(“湛江信息化测试登录”).Page(“湛江东兴石油企业有限公司办公自动化系统”).Frame(“mainFrame”).Output CheckPoint(“78”)
Dim mm
‘mm=DataTable.GlobalSheet.GetParameter(“mainFrameOutput_Text_out”).Value
//注释,获取datatable值与DataTable(“mainFrameOutput_Text_out”, dtGlobalSheet)一致
mm=DataTable(“mainFrameOutput_Text_out”, dtGlobalSheet)
MsgBox mm
Dim res,cmd,sql
Set res=createobject(“adodb.recordset”)
Set cmd=createobject(“adodb.command”)
Cmd.activec
Cmd.CommandType = 1
sql=”select count(*) from oa_receivebumf where BUMFNAME like ‘%收文测试%'”
‘sql=”select count(*) from oa_receivebumf where BUMFNAME='”&nn&”‘”
//注释,sql语句,等于时sql语句
// sql=”select count(*) from oa_receivebumf where BUMFNAME like ‘%nn%'” //like时sql语句
Cmd.CommandText = sql
Set res = Cmd.Execute()
//msgbox res(“name”)
MsgBox res(0)
If Cstr(res(0)) = Cstr(mm)Then
Reporter.ReportEvent micPass, “test”, “查询成功”
else
Reporter.ReportEvent micfail, “test”, “查询失败”
End If
Set res = nothing
Set cmd.ActiveConnection = nothing
Set Cmd= nothing
终于
这个跟了我有6年的风扇
走完了它的短短的一生。
从03年开始,到09年,
它的风很凉,在当年的宿舍来说,应该是风最大的
价格大概是30多块吧,很便宜了
大概是04年的一个夏天的晚上,突然一声响,它不转了
我起来检查,发现是风扇叶子竟然断了一片,卡在里面了
我拿出断掉的那片,风扇继续转,不过就是很不平衡,
于是我就把坏的那片叶子的对角那一片也撕了一半下来
perfect!
继续运行,
直到05年毕业,又到07年毕业,到广州
几个星期前,它开始出现了不正常的症状了
经常会启动不了,但是拍一下也许又能动了
有时候转了一会又停下来了,毛病逐渐的显示出来,
终于,几天前,彻底的不动了,无论怎么拍就是不动
看来,终于到了该说再见的时候
这么长的时间,我真的很舍不得。。。。。
You’ll probably know by now that the transactional email templates in Magento are a bit, with respect, “naff”. To edit through the admin will take forever and a day so here’s a couple of useful solutions to help make things easier.
The Magento email templates are located in (note: “en_US” may change depending on language).
magento\app\locale\en_US\template\email\account_new.html”(24,48):
magento\app\locale\en_US\template\email\admin_password_new.html”(27,73):
magento\app\locale\en_US\template\email\newsletter_subscr_confirm.html”(28,69):
magento\app\locale\en_US\template\email\order_creditmemo.html”(23,63):
magento\app\locale\en_US\template\email\order_creditmemo.html”(75,62):
magento\app\locale\en_US\template\email\order_invoice.html”(23,63):
magento\app\locale\en_US\template\email\order_invoice.html”(75,62):
magento\app\locale\en_US\template\email\order_new.html”(23,63):
magento\app\locale\en_US\template\email\order_new.html”(79,62):
magento\app\locale\en_US\template\email\order_shipment.html”(23,63):
magento\app\locale\en_US\template\email\order_shipment.html”(81,62):
magento\app\locale\en_US\template\email\order_update.html”(26,52):
magento\app\locale\en_US\template\email\password_new.html”(24,41):
magento\app\locale\en_US\template\email\wishlist_share.html”(23,65):
replace alt=”Magento” with alt=”your store name”
replace Magento Demo Store with your store name
replace mailto:magento@varien.com with mailto:email@yourstore.com
replace dummyemail@magentocommerce.com with email@yourstore.com
replace (800) DEMO-STORE with (0800) YOUR STORE NUMBER
replace Monday – Friday, 8am – 5pm PST with your own store opening times and timezone
Another option would be to create a shell script with all you’re information in which goes through the directories in question and replaces text as we need. Note: You will need your Store View Name and Store Name to match your domain name.
#!/bin/sh
phone=(123)456-7890
find app/locale/en_US/template/email/sales -type f -exec sed -i ’s/alt=”Magento”/alt=”{{var order.getStoreGroupName()}}”/g’ {} \;
find app/locale/en_US/template/email/sales -type f -exec sed -i ’s/Magento Demo Store/{{var order.getStoreGroupName()}} /g’ {} \;
find app/locale/en_US/template/email/sales -type f -exec sed -i ’s/mailto:magento@varien.com/sales@{{var order.getStoreGroupName()}}/g’ {} \;
find app/locale/en_US/template/email/sales -type f -exec sed -i ’s/dummyemail@magentocommerce.com/sales@{{var order.getStoreGroupName()}}/g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/alt=”Magento”/alt=”{{var customer.store.name}}”/g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/Magento Demo Store/{{var customer.store.name}} /g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/mailto:magento@varien.com/sales@{{var customer.store.name}}/g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/dummyemail@magentocommerce.com/sales@{{var customer.store.name}}/g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i “s/(800)DEMO-STORE/$phone/g” {} \;
find app/locale/en_US/template/email -type f -exec sed -i “s/(800)DEMO-NUMBER/$phone/g” {} \;
find app/locale/en_US/template/email -type f -exec sed -i “s/(800) DEMO-NUMBER/$phone/g” {} \;
find app/locale/en_US/template/email -type f -exec sed -i “s/(800) DEMO-STORE/$phone/g” {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/Monday – Friday, 8am – 5pm PST/24×7/g’ {} \;
find app/locale/en_US/template/email -type f -exec sed -i ’s/logo_email.gif/logo.gif/g’ {} \;
The problem was due to the directory permissions on /downloader (was 775, needed to be 755 and the /downloader/index.php (was 755 needed to be 644).
Also, the magento php.ini changes needed to be added to a custom php.ini in the main directory and /downloader.