51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1522|回复: 2
打印 上一主题 下一主题

[求助] LR11录制SAP操作,验证回放提示错误“r_strings.h (50): missing identifier”

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2013-6-3 17:09:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 cowboy36 于 2013-6-4 10:59 编辑

r_strings.h (50): missing identifier
lr_strings.h (50): syntax error; found `0' expecting `;'
lr_strings.h (50): unrecognized declaration
lr_strings.h (50): unrecognized declaration
lr_strings.h (51): unrecognized declaration
lr_strings.h (51): warning: empty declaration

具体代码如下:
{

        sapgui_open_connection_ex("   /SAP_CODEPAGE=1100  /FULLMENU  192.168.199.21 00 /3 /UPDOWNLOAD_CP=2",
                "ECQ",
                "con[0]");

        sapgui_select_active_connection("con[0]");

        sapgui_select_active_session("ses[0]");

        sapgui_select_active_window("wnd[0]");

        sapgui_window_resize("163",
                "25",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui104",
                END_OPTIONAL);

        /*Before running script, enter password in place of asterisks in logon function*/

        lr_think_time(18);

        sapgui_logon("YANGQINY",
                "*****",
                "200",
                "ZH",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1012",
                END_OPTIONAL);

        lr_think_time(4);

        sapgui_set_ok_code("fd01",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1013",
                END_OPTIONAL);

        sapgui_send_vkey(ENTER,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1014",
                END_OPTIONAL);

        lr_think_time(8);

        sapgui_select_active_window("wnd[1]");

        sapgui_select_combobox_entry("员工客户",
                cmbRF02D1,
                "Z005",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1017",
                END_OPTIONAL);

        sapgui_set_text("公司代码",
                "5080",
                ctxtRF02D1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1018",
                END_OPTIONAL);

        sapgui_set_focus(ctxtRF02D1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1019",
                END_OPTIONAL);

        sapgui_send_vkey(ENTER,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1021",
                END_OPTIONAL);

        lr_think_time(54);

        sapgui_select_active_window("wnd[0]");

        sapgui_select_combobox_entry("先生",
                cmbSZA1_D01001,
                "?…??”?",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1024",
                END_OPTIONAL);

        sapgui_set_text("ADDR1_DATA-NAME1",
                "李勇",
                txtADDR1_DATA1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1025",
                END_OPTIONAL);

        sapgui_set_text("ADDR1_DATA-NAME2",
                "李勇",
                txtADDR1_DATA2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1026",
                END_OPTIONAL);

        sapgui_set_text("搜索项 1/2",
                "J0198",
                txtADDR1_DATA3,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1027",
                END_OPTIONAL);

        sapgui_set_focus(ctxtADDR1_DATA1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1028",
                END_OPTIONAL);

        sapgui_send_vkey(F4,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1030",
                END_OPTIONAL);

        sapgui_set_property(0,
                "position",
                "26",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1033",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[1]");

        sapgui_window_scroll_to_row("26",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1037",
                END_OPTIONAL);

        sapgui_set_focus(lbl1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1036",
                END_OPTIONAL);

        sapgui_send_vkey(F2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1040",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[0]");

        sapgui_press_button("公司代码数据",
                btn1,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1043",
                END_OPTIONAL);

        sapgui_send_vkey(F4,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1046",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[1]");

        sapgui_window_scroll_to_row("0",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1050",
                END_OPTIONAL);

        sapgui_set_focus(lbl2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1049",
                END_OPTIONAL);

        sapgui_send_vkey(F2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1053",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[0]");

        sapgui_select_tab("支付交易",
                tabpTAB021,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1056",
                END_OPTIONAL);

        sapgui_send_vkey(F4,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1059",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[1]");

        sapgui_window_scroll_to_row("0",
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1063",
                END_OPTIONAL);

        sapgui_send_vkey(F2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1064",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[0]");

        sapgui_press_button("保存   (Ctrl+S)",
                btn2,
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1067",
                END_OPTIONAL);

        sapgui_select_active_window("wnd[1]");

        sapgui_window_close(
                BEGIN_OPTIONAL,
                        "AdditionalInfo=sapgui1070",
                END_OPTIONAL);

        return 0;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2013-6-3 17:23:38 | 只看该作者
自己顶下,求高手帮忙看下
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2013-6-4 10:58:07 | 只看该作者
沉得好快,麻烦高手帮忙解决下
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-9-23 01:29 , Processed in 0.137125 second(s), 29 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表