Posts by ZeSousa • 21 points
6 posts
-
0
votes2
answers116
viewsA: Generate Log by day date C#
You can format the output with Datetime.Now.ToString("dd mm yy") or something like that. If you want to take a look at the documentation of a loger like log4net, here you can find examples of how to…
-
0
votes3
answers702
viewsA: Function that takes another function as a parameter in C#
If you want a function to be passed by parameter in a simple way use Action or Func. The difference between the two is that Action is void type. With Func you can have a Return type, and up to 16…
-
1
votes2
answers247
viewsA: Python: requests.get("https://pt.stackoverflow.com/") never returns anything
The fact that I return only at the end of the timeout leads me to believe that the request is failing. I ran the code pretty much the way it is and it worked. Is it possible that your firewall is…
-
1
votes3
answers983
viewsA: Check if an element exists if the page is loaded. (Selenium)
You can set the timeout in a specific function, so you wouldn’t be affecting the overall timeout behavior and you could set the timeout by parameters. The following example is an Extension method…
-
0
votes3
answers836
viewsA: I can’t find an element for Id
As mentioned earlier you can do the driver.SwitchTo().Frame(driver.FindElement(By.Id("id_do_frame1"))); , however in certain cases where the DOM has already changed you may need to navigate back to…
-
0
votes2
answers51
viewsA: How to pick a Function From a string
In the example you wrote you are trying to directly invoke the object when you actually wanted to call a function of it. The following example creates an object through the Activator.Createinstance…