Issue 4472 in selenium: Trying to handle javascript type Modal Dialogue Box

2 views
Skip to first unread message

sele...@googlecode.com

unread,
Aug 27, 2012, 5:28:39 PM8/27/12
to selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 4472 by manoj.s....@gmail.com: Trying to handle javascript type
Modal Dialogue Box
http://code.google.com/p/selenium/issues/detail?id=4472


MY CODE:
VontuSelenium selenium = null;

Object sessionInstance = getCommandContextData(OpenBrowser.class);
if(sessionInstance != null)
{
selenium = (VontuSelenium)sessionInstance;

String text = getStringParameter(0,"");

long time_out_default = selenium.getCommandTimeout();
int time_out = getNumericParameter(1,(int)time_out_default);


try{
selenium.assertElement(HtmlDom.addNoteLocator);
selenium.click(HtmlDom.addNoteLocator);
WebDriver driver = selenium.getWebDriver();

Alert prompt = driver.switchTo().alert();

prompt.sendKeys(text);
prompt.accept();

selenium.waitForPageToLoad(time_out);
}
catch(Throwable assertExp)
{
commandFailed("Failed to add note from list", assertExp);
}

}

}


STACK TRACE:


Aug 27, 2012 2:17:37 PM com.vontu.test.framework.ExecutionLogger output
INFO: OK: SelectIncidentFromListView 00000190
Aug 27, 2012 2:17:37 PM com.vontu.test.framework.ExecutionLogger output
INFO: Started Command (line 13): AddNoteFromList testing note feature
Screen shot:
C:\temp\2012-08-27-141718_OUTPUT\manoj.act\AddNoteFromList1.jpeg
Aug 27, 2012 2:17:56 PM
com.vontu.test.command.selenium.api.SeleniumApiBaseCommand logFailure
HTML Dump: C:\temp\2012-08-27-141718_OUTPUT\manoj.act\AddNoteFromList1.html
SEVERE: Captured screen to
C:\temp\2012-08-27-141718_OUTPUT\manoj.act\AddNoteFromList1.jpeg
Aug 27, 2012 2:17:56 PM
com.vontu.test.command.selenium.api.SeleniumApiBaseCommand logFailure
SEVERE: Captured HTML Dump to
C:\temp\2012-08-27-141718_OUTPUT\manoj.act\AddNoteFromList1.html
Aug 27, 2012 2:17:56 PM
com.vontu.test.command.selenium.api.SeleniumApiBaseCommand logFailure
SEVERE: Failed to add note from list
org.openqa.selenium.NoAlertPresentException: No alert is present (WARNING:
The server did not provide any stacktrace information)
Command duration or timeout: 2.12 seconds
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18
21:08:56'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64',
os.version: '6.1', java.version: '1.7.0_05'
Driver info: driver.version: RemoteWebDriver
Session ID: cd28d515-be2b-4483-828d-557767455e57
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:498)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:502)
at
org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.alert(RemoteWebDriver.java:774)
at
com.vontu.test.command.selenium.api.incident.AddNoteFromList.execute(AddNoteFromList.java:65)
at com.vontu.test.framework.Command.runExecute(Command.java:289)
at com.vontu.test.framework.Command.action(Command.java:239)
at com.vontu.test.framework.ScriptAdapter.runCommand(ScriptAdapter.java:94)
at com.vontu.test.framework.ScriptAdapter.execute(ScriptAdapter.java:61)
at com.vontu.test.framework.Fixture.execute(Fixture.java:67)
at
com.vontu.test.framework.FixtureExecutionSet.executeFixtures(FixtureExecutionSet.java:46)
at
com.vontu.test.framework.FixtureExecutionSet.execute(FixtureExecutionSet.java:55)
at com.vontu.test.framework.Runner.run(Runner.java:172)
at com.vontu.test.framework.Runner.main(Runner.java:78)

Error: 13: AddNoteFromList "testing note feature"
AddNoteFromList
(c:\src\depot\main\test\suite\_sample_scripts\manoj.act:13 )
Failed to add note from list
java.lang.AssertionError: Failed to add note from list
at
com.vontu.test.command.selenium.api.SeleniumApiBaseCommand.commandFailed(SeleniumApiBaseCommand.java:109)
at
com.vontu.test.command.selenium.api.incident.AddNoteFromList.execute(AddNoteFromList.java:74)
at com.vontu.test.framework.Command.runExecute(Command.java:289)
at com.vontu.test.framework.Command.action(Command.java:239)
at com.vontu.test.framework.ScriptAdapter.runCommand(ScriptAdapter.java:94)
at com.vontu.test.framework.ScriptAdapter.execute(ScriptAdapter.java:61)
at com.vontu.test.framework.Fixture.execute(Fixture.java:67)
at
com.vontu.test.framework.FixtureExecutionSet.executeFixtures(FixtureExecutionSet.java:46)
at
com.vontu.test.framework.FixtureExecutionSet.execute(FixtureExecutionSet.java:55)
at com.vontu.test.framework.Runner.run(Runner.java:172)
at com.vontu.test.framework.Runner.main(Runner.java:78)
Caused by: org.openqa.selenium.NoAlertPresentException: No alert is present
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.12 seconds
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18
21:08:56'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64',
os.version: '6.1', java.version: '1.7.0_05'
Driver info: driver.version: RemoteWebDriver
Session ID: cd28d515-be2b-4483-828d-557767455e57
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:498)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:502)
at
org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.alert(RemoteWebDriver.java:774)
at
com.vontu.test.command.selenium.api.incident.AddNoteFromList.execute(AddNoteFromList.java:65)
... 9 more

Aug 27, 2012 2:17:56 PM com.vontu.test.framework.ExecutionLogger output
INFO: Error: AddNoteFromList testing note feature AddNoteFromList
(c:\src\depot\main\test\suite\_sample_scripts\manoj.act:13)
Aug 27, 2012 2:17:56 PM com.vontu.test.framework.ExecutionLogger
outputCommandResult
INFO: Failed to add note from list
java.lang.AssertionError: Failed to add note from list
at
com.vontu.test.command.selenium.api.SeleniumApiBaseCommand.commandFailed(SeleniumApiBaseCommand.java:109)
at
com.vontu.test.command.selenium.api.incident.AddNoteFromList.execute(AddNoteFromList.java:74)
at com.vontu.test.framework.Command.runExecute(Command.java:289)
at com.vontu.test.framework.Command.action(Command.java:239)
at com.vontu.test.framework.ScriptAdapter.runCommand(ScriptAdapter.java:94)
at com.vontu.test.framework.ScriptAdapter.execute(ScriptAdapter.java:61)
at com.vontu.test.framework.Fixture.execute(Fixture.java:67)
at
com.vontu.test.framework.FixtureExecutionSet.executeFixtures(FixtureExecutionSet.java:46)
at
com.vontu.test.framework.FixtureExecutionSet.execute(FixtureExecutionSet.java:55)
at com.vontu.test.framework.Runner.run(Runner.java:172)
at com.vontu.test.framework.Runner.main(Runner.java:78)
Caused by: org.openqa.selenium.NoAlertPresentException: No alert is present
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.12 seconds
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18
21:08:56'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64',
os.version: '6.1', java.version: '1.7.0_05'
Driver info: driver.version: RemoteWebDriver
Session ID: cd28d515-be2b-4483-828d-557767455e57
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:498)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:502)
at
org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.alert(RemoteWebDriver.java:774)
at
com.vontu.test.command.selenium.api.incident.AddNoteFromList.execute(AddNoteFromList.java:65)
... 9 more

sele...@googlecode.com

unread,
Sep 11, 2012, 5:24:59 AM9/11/12
to selenium-develope...@googlegroups.com
Updates:
Status: NeedsClarification
Labels: Component-WebDriver

Comment #1 on issue 4472 by barancev: Trying to handle javascript type
We're going to need a lot more detail to debug this. A full, reduced HTML
test page, or a link to a public page to run your script against.

sele...@googlecode.com

unread,
Oct 12, 2012, 3:06:55 AM10/12/12
to selenium-develope...@googlegroups.com
Updates:
Status: Invalid
Labels: -Status-Untriaged

Comment #2 on issue 4472 by barancev: Trying to handle javascript type
No answer from the author for long time, closing the issue.

Reply all
Reply to author
Forward
0 new messages