Letractively / autotester

Automatically exported from code.google.com/p/autotester
1 stars 1 forks source link

关于如何点击一个带有Js的链接 #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
<A 
onmousedown="return aliclick(null, '?tracelog=2013category_sell_next')" 
href="www.google.cn#">下一步,填写信息详情</A> 

第一步,我用webBrower控件做控制, //for (int i = 0; i < 
this.a0.Document.GetElementsByTagName("A").Count; i++)
                        //{
                        //    LinkString = 
this.a0.Document.GetElementsByTagName("A")[i].InnerText;
                        //    if (LinkString != null)
                        //    {
                        //        if (this.a0.Document.GetElementsByTagName
("A")[i].InnerText.Contains("下一步"))
                        //        {
                        //            //this.a0.Document.GetElementsByTagNa
me("A")[i].InvokeMember("onMouseDown");
                        //            //this.a0.Document.GetElementsByTagNa
me("A")[i].InvokeMember("onMouseUp");
                        //            //InvokeMember代理开出另外一个线程指行程
序
                        //            //this.a0.Document.GetElementsByTagName
("A")[i].InvokeMember("click");
                        //            //
                        //            this.a0.Document.GetElementsByTagName
("A")[i].InvokeMember("MouseDown");
                        //            //
                        //            this.a0.Document.GetElementsByTagName
("A")[i].InvokeMember("MouseUp");

                        //            break;

                        //        }
                        //    }

                        //}

。。。。。。。。。。。。都没有反应

后来我尝试用,autotesterlib里的ts.Objects.Link("下一步,填写信��
�详情").click(),
但没有反应,后来,我请教了,shrinerrain 
,已是在他的指导下,用ts.Objects.Link("下
一步,填写信息详情"). 
.MouseClick(10,10),终于成了,跳转了,

Original issue reported on code.google.com by tradek...@gmail.com on 1 Apr 2010 at 2:09

GoogleCodeExporter commented 9 years ago
还有注意一点是,一定要让被点击处,出现在屏幕上,要不��
�标点不到,对MouseClick后面的参数,意义是
什么,因为没有文档可参考,我自己理解是点击区域的的坐��
�,如果是这样,我有点不理解的是,这个区域是
多大,我后来测量了一下,点击的,在我的屏幕的,(568,66
3)这个点上,而我用的(10,
10)。。。。。。。。。。shrinerrain,能不能给我多一点事例�
��或资料,让我更进一步用
autotesterlib

Original comment by tradek...@gmail.com on 1 Apr 2010 at 2:16

GoogleCodeExporter commented 9 years ago
请问下我如何点击map上的超链接呀 
我研究了很久了还是不知道,现在我的项目被迫中止,非常��
�心,请好心人帮帮我。非常感谢,代码如下。
<MAP id=jfreechart-onetime-209112.png name=jfreechart-onetime-209112.png> <AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|PODE|19')" shape=rect alt="" 
coords=866,60,900,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|PA|0')" shape=rect alt="" 
coords=802,60,836,316><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|DOE|87')" shape=rect alt="" 
coords=738,60,772,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|AFM|52')" shape=rect alt="" 
coords=674,60,708,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|NCR|198')" shape=rect alt="" 
coords=610,60,644,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|NFR|171')" shape=rect alt="" 
coords=545,60,579,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|ATP|4')" shape=rect alt="" 
coords=481,60,515,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|MCON|4')" shape=rect alt="" 
coords=417,60,451,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|TO|0')" shape=rect alt="" 
coords=353,60,387,316><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|AFLP|6')" shape=rect alt="" 
coords=289,60,323,314><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|HNC3|0')" shape=rect alt="" 
coords=225,60,259,316><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|HNC2|0')" shape=rect alt="" 
coords=160,60,194,316><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadDetails('TRANX_GLOBAL_CARGO_TRACK
_EXPORT_ISSUES_CHART','Issues','E|HNC1|0')" shape=rect alt="" 
coords=96,60,130,316><AREA 
href="javascript:codsPH.P.globalCargoTrack.loadAllDetails()" shape=rect alt="" 
coords=412,26,547,39></MAP>

Original comment by chenxu76...@gmail.com on 17 Sep 2013 at 1:39