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
snehal mulay
Posts : 4
Join date : 2011-03-18

How to write logs> Empty How to write logs>

Mon Mar 21, 2011 8:19 pm
Hi all,

I am using selenium rc. i want to write logs which we get in IDE like [INFO] and [ERROR]..how can i write this. How can I get error string?

-Snehal
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

How to write logs> Empty Re: How to write logs>

Tue Mar 22, 2011 8:26 pm
hi,

Try to use the following command

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

I think this will solve the purpose. Best of luck.
avatar
auto_ashish1
Active particpant
Active particpant
Posts : 21
Join date : 2011-03-10

How to write logs> Empty Re: How to write logs>

Tue Apr 05, 2011 11:53 pm
1) Logs can be generated by using log4j API in java.

2)Log4j API can help you create 2 log files. In one log file, you can write out your normal testing logs and in the other log file, you can output the selenium server logs.

3)Following are some good links describing log4j API
http://www.laliluna.de/articles/log4j-tutorial.html
http://www.mkyong.com/logging/log4j-log4j-properties-examples/

Regards

Ashish
itsthakur@gmail.com
91-9888179981


For online Selenium training go to my website- www.sejsoft.com
Sponsored content

How to write logs> Empty Re: How to write logs>

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