我的问题是为下面的面板设置dom ID。无法在selenium脚本中获取id 给像FocusPanel和VerticalPanel的id像
focusPanel.ensureDebugId("focusPanel");
and also
<inherits name="com.google.gwt.user.Debug"/> in gwt.xml file
but it is not taking ids for these panels am not able get these panels in selenium script
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"focusPanel"}
Command duration or timeout: 15.02 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.37.0', revision: 'a7c61cbd68657e133ae96672cf995890bad2ee42', time: '2013-10-18 09:51:02'
System info: host: 'INHYDRMOTURI2', ip: '10.91.115.72', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_21'
Session ID: 76ec6eca-405c-47be-a5ba-7ea11d3ca515
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=XP, databaseEnabled=true, cssSelectorsEnabled=true, javascriptEnabled=true, acceptSslCerts=true, handlesAlerts=true, browserName=firefox, browserConnectionEnabled=true, nativeEvents=true, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=27.0.1}]
can u suggest me how to set dom ids for verticalpanel and focuspanel
答案 0 :(得分:0)
您是否尝试过设置ID
focusPanel.getElement().setId("focusPanel");
如果ensureDebugId()
,则ID将变为gwt-debug-[your id]
。
例如。
focusPanel.ensureDebugId("focusPanel");
focusPanel
的ID为gwt-debug-focusPanel