Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Jazz
Posts : 9
Join date : 2009-07-30

Creating detail log for selenium command execution (Selenium RC Java client)? Empty Creating detail log for selenium command execution (Selenium RC Java client)?

Thu Aug 20, 2009 11:36 am
Hi,

One of problem faced by selenium Rc user are as follows:

"I am using Selenium RC java client and test-ng. I want to create detail log + failed screen shots meacnism in a generic way (Should be able to used function for all tests)"

The possible solution for this problem is to use the following command and get the desired result you want:

1. storeLogMessages ( variableName )
Return the contents of the log.

This is a placeholder intended to make the code generator make this API available to clients. The selenium server will intercept this call, however, and return its recordkeeping of log messages since the last call to this API. Thus this code in JavaScript will never be called.

The reason I opted for a servercentric solution is to be able to support multiple frames served from different domains, which would break a centralized JavaScript logging mechanism under some conditions.

Returns:
all log messages seen since the last call to this API

2. captureEntirePageScreenshot(filename, kwargs)

Arguments:


* filename - the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.
* kwargs - a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:

background
the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).

Saves the entire contents of the current window canvas to a PNG file. Currently this only works in Mozilla and when running in chrome mode. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Implementation mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org for details.

3. captureEntirePageScreenshotAndWait(filename, kwargs)
Generated from captureEntirePageScreenshot(filename, kwargs)

Arguments:

* filename - the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.
* kwargs - a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:

background
the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).

Saves the entire contents of the current window canvas to a PNG file. Currently this only works in Mozilla and when running in chrome mode. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Implementation mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org for details.

I hope this will help you little bit. Best of Luck.

Bye
Back to top
Permissions in this forum:
You cannot reply to topics in this forum