Capture html just before an error execution?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Capture html just before an error execution?

Ana MB
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ec905848-6dcc-4c74-a585-2ead4bc51192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8d64a335-d0e2-4d13-a126-ae3f6c6c27bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
I've tried with:

screenCapture  **/captura.png

But it did'nt work...


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6de2c980-513c-4e9a-9db2-b9ba1f342df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Victor Martinez
Hi Ana,

Can you please explain deeply what you are trying to achieve? I don't really understand what you need though, and what tech stack you are using atm 

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d5d4616c-038b-4812-af4f-5346a9a69a79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
Hola Victor, como veo que eres español te lo escribo en español!!

Mira, necesito capturar un pantallazo de la pagina donde mi test se queda al fallar, simplemente para ver cuál es la ultima pagina que visita cuando casca al hacer determinada acción que le provoque un fallo. Pero como es un fallo de ejecución, desde Jenkins es dificil de configurar (para mi, soy nueva en este mundillo...), ya que si falla cierra el test y te manda correo diciendo que ha fallado y el fallo que ha encontrado, pero yo necesito que también me mande el pantallazo de la ultima pagina que visitó el test.

No sé si me estoy explicando o te estoy liando mas perdona....

Muchísimas gracias, y saludos desde Madrid! :)


El martes, 5 de diciembre de 2017, 15:48:05 (UTC+1), Victor Martinez escribió:
Hi Ana,

Can you please explain deeply what you are trying to achieve? I don't really understand what you need though, and what tech stack you are using atm 

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/67c56d32-a88a-456d-a601-c3464d030a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
In reply to this post by Ana MB
I've tried with this plugin: https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b280de08-cbd5-49e4-aa3e-d551d6127c57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
I show you another picture of the fail execution of the plugin:


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d783d5ca-be56-4ce8-98ed-54db89d3a619%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
I've written the following to my test case java file:

String actualTest = this.getClass().getName()+"."+testname.getMethodName();
File scrFile = ((TakesScreenshot)FabricaWebDriver.getDriver()).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("target/screenshots/"+actualTest+".png"));










And it work!




El jueves, 7 de diciembre de 2017, 11:10:09 (UTC+1), Ana MB escribió:
I show you another picture of the fail execution of the plugin:

<a href="https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;">


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9af05899-7672-4b33-a094-fc99c8694bcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
But it work only when a test is SUCCESS. 
I need it when a test is FAILED,...... and I'm not able to get it.

I've tried with this conditions, but it doesn't work and I don't understand why...


My test result is the following:


Any help, please? :(



El jueves, 7 de diciembre de 2017, 12:12:43 (UTC+1), Ana MB escribió:
I've written the following to my test case java file:

String actualTest = this.getClass().getName()+"."+testname.getMethodName();
File scrFile = ((TakesScreenshot)FabricaWebDriver.getDriver()).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("target/screenshots/"+actualTest+".png"));










And it work!




El jueves, 7 de diciembre de 2017, 11:10:09 (UTC+1), Ana MB escribió:
I show you another picture of the fail execution of the plugin:

<a href="https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;">


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a03f386e-526d-4d76-bc2b-55811d51c48a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
Does anybody know why is it happening?

Thanks so much!!! 


El jueves, 7 de diciembre de 2017, 13:27:32 (UTC+1), Ana MB escribió:
But it work only when a test is SUCCESS. 
I need it when a test is FAILED,...... and I'm not able to get it.

I've tried with this conditions, but it doesn't work and I don't understand why...

<a href="https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;">


My test result is the following:

<a href="https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;">


Any help, please? :(



El jueves, 7 de diciembre de 2017, 12:12:43 (UTC+1), Ana MB escribió:
I've written the following to my test case java file:

String actualTest = this.getClass().getName()+"."+testname.getMethodName();
File scrFile = ((TakesScreenshot)FabricaWebDriver.getDriver()).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("target/screenshots/"+actualTest+".png"));










And it work!




El jueves, 7 de diciembre de 2017, 11:10:09 (UTC+1), Ana MB escribió:
I show you another picture of the fail execution of the plugin:

<a href="https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;">


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c1b34428-3ca1-4ed7-aecc-68905a79a843%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
In reply to this post by Ana MB
Well,... I've realized that it can't be work if the test fails because in this case, the tests doesn't finish and doesn't call to "takeScreenshot()" method in the code....

So... what could be the solution to take a screenshot of a webpage in case the test fails???

Thanks so much!!!!


El jueves, 7 de diciembre de 2017, 13:27:32 (UTC+1), Ana MB escribió:
But it work only when a test is SUCCESS. 
I need it when a test is FAILED,...... and I'm not able to get it.

I've tried with this conditions, but it doesn't work and I don't understand why...

<a href="https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;">


My test result is the following:

<a href="https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;">


Any help, please? :(



El jueves, 7 de diciembre de 2017, 12:12:43 (UTC+1), Ana MB escribió:
I've written the following to my test case java file:

String actualTest = this.getClass().getName()+"."+testname.getMethodName();
File scrFile = ((TakesScreenshot)FabricaWebDriver.getDriver()).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("target/screenshots/"+actualTest+".png"));










And it work!




El jueves, 7 de diciembre de 2017, 11:10:09 (UTC+1), Ana MB escribió:
I show you another picture of the fail execution of the plugin:

<a href="https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;">


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/056e2287-37ff-4ff0-9eeb-498990ba3f3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Capture html just before an error execution?

Ana MB
Done! with this:

                 try{
driver.findElement(By.xpath(".//*[@id='reserva']")).click();
}
catch (Exception e) {
takeScreenshot(driver,e);
}
finally {
driver.close();
}

It works!

El lunes, 11 de diciembre de 2017, 10:31:39 (UTC+1), Ana MB escribió:
Well,... I've realized that it can't be work if the test fails because in this case, the tests doesn't finish and doesn't call to "takeScreenshot()" method in the code....

So... what could be the solution to take a screenshot of a webpage in case the test fails???

Thanks so much!!!!


El jueves, 7 de diciembre de 2017, 13:27:32 (UTC+1), Ana MB escribió:
But it work only when a test is SUCCESS. 
I need it when a test is FAILED,...... and I'm not able to get it.

I've tried with this conditions, but it doesn't work and I don't understand why...

<a href="https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-1JLoAG4PVX4/Wikzhx6OrMI/AAAAAAAAAM4/ikT27KqUEhwa4VugKhOog247tsXTe8U7wCLcBGAs/s1600/Screenshot_5.jpg&#39;;return true;">


My test result is the following:

<a href="https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-KW1uPaEPmjw/WikznFYzOKI/AAAAAAAAAM8/KDtDdRZpP8s48-UAQbI3NoZ-ZAuWNLDGACLcBGAs/s1600/Screenshot_4.jpg&#39;;return true;">


Any help, please? :(



El jueves, 7 de diciembre de 2017, 12:12:43 (UTC+1), Ana MB escribió:
I've written the following to my test case java file:

String actualTest = this.getClass().getName()+"."+testname.getMethodName();
File scrFile = ((TakesScreenshot)FabricaWebDriver.getDriver()).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("target/screenshots/"+actualTest+".png"));










And it work!




El jueves, 7 de diciembre de 2017, 11:10:09 (UTC+1), Ana MB escribió:
I show you another picture of the fail execution of the plugin:

<a href="https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-gNkwmwIF-lc/WikTU1ZzRvI/AAAAAAAAAMo/nAeXDsWrEzEf1q8s7kwB0dx1ZBFHslJOQCLcBGAs/s1600/Screenshot_2.jpg&#39;;return true;">


Could anybody help me? Thanks guys!!!!


El jueves, 7 de diciembre de 2017, 9:54:46 (UTC+1), Ana MB escribió:
I've tried with this plugin: <a href="https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FUI%2BTest%2BCapture%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlbD4OWZ5mORU7RCAxywBYTKvthw&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/UI+Test+Capture+Plugin
But I can't configure it, it doesn't let me do it... why? I show you in the picture:

<a href="https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg" style="margin-left:1em;margin-right:1em" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-_zFSgmSZ2Ok/WikBoY6-V7I/AAAAAAAAAMY/7Bj0UE83mDAaEQIsyWiLtSvruEQ8Q6--QCLcBGAs/s1600/Screenshot_1.jpg&#39;;return true;">

Does anybody knows why?

Thanks so much for your help!


El martes, 5 de diciembre de 2017, 13:34:37 (UTC+1), Ana MB escribió:
I need some shell command to take a screenshoot and save in some directory. 
How could be that shell code?

Thanks so much!!

El martes, 5 de diciembre de 2017, 13:24:27 (UTC+1), Ana MB escribió:
Hi guys!

Does anybody know how to capture the html/url before an error appear in the test case??
I need to know the previous URL, and I don't know how...

Thanks so much for your help!!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d6c7cff4-89c4-488d-952e-3c438835e13c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.