Guest User

Untitled

a guest
Jun 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. List<string> listYears = new List<string>();
  2.  
  3. listYears = (List<string>)window.ExecuteScript(@"$(document).ready(function(){
  4. var scr = document.createElement('script');
  5. scr.src = 'https://code.jquery.com/jquery-3.3.1.js';
  6. document.body.appendChild(scr);
  7.  
  8. var years = []
  9. var thisYear = 0;
  10.  
  11. $('time').each(function(){
  12. thisYear = parseInt($(this).attr('datetime').split('-')[0]);
  13. years.push(thisYear);
  14. });
  15.  
  16. return years.toString();
  17. });");
  18.  
  19. System.Diagnostics.Debug.WriteLine("*************************");
  20. System.Diagnostics.Debug.WriteLine("*************************");
  21. System.Diagnostics.Debug.WriteLine("*************************");
  22. System.Diagnostics.Debug.WriteLine("listYears: " + listYears[0]);
  23. System.Diagnostics.Debug.WriteLine("*************************");
  24. System.Diagnostics.Debug.WriteLine("*************************");
  25. System.Diagnostics.Debug.WriteLine("*************************");
  26.  
  27. System.Diagnostics.Debug.WriteLine("*************************");
  28. System.Diagnostics.Debug.WriteLine("*************************");
  29. System.Diagnostics.Debug.WriteLine("*************************");
  30. System.Diagnostics.Debug.WriteLine("listYears: " + listYears);
  31. System.Diagnostics.Debug.WriteLine("*************************");
  32. System.Diagnostics.Debug.WriteLine("*************************");
  33. System.Diagnostics.Debug.WriteLine("*************************");
Add Comment
Please, Sign In to add comment