Haya, this is still lingering?
Solutions:
1. If the message reported is in a popup generated from alert() or a wrapper around alert() you can do the following
var alertDlg = driver.switchTo().alert();
var text = alertDlg.getText();
text will now have the file name and you can strip the file name from there
2. If the message is generated from a <div> (Most likely), you can manual "Inspect Element" and get the id of the div and do it a couple of
times more to make sure it is static. Then you can do this:
var text = document.getElementById('idOfBox').innerHTML;
Then again you can strip the file name out of text.
Steve
From: "Bwana Lawi" <mail2lawi@gmail.com>
To: "Skunkworks forum" <skunkworks@lists.my.co.ke>
Sent: Domingo, 22 de Diciembre 2013 22:17:46
Subject: [Skunkworks] Fwd: Javascript Question
Hi Joseph,
From your explanation, and several internet searches, it looks like what I am looking for is not possible/doable :(
As I mentioned, this is a webapp running on jboss. All the user does is click on an option.
For instance, a simple report showing list of countries:
When the user clicks on Print to Server, the request is sent back to the reporting server and a physical file is created in a directory on the server. Then the response below is sent to the user:
All I want is to access the COUNTRY.txt from js. Vanilla js, not ajax. It's not possible to recreate the variables/parameters being sent to the jboss server classes. NB: There are 2 servers at play here: jboss (middleware) and the reporting server.
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke