uselessxp
Selenium wait for the page to load completely
For some reason looks like that the implicit way:
Works perfectly, also if I don't have idea about how
I randomly decited to use this method, for go on, thinking that
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
just add a 10 seconds pause before execute next commands, but looks like that this one "wait max 10 seconds" but if he can't perform operations before, it do it
So I suppose that it automatically handle the situation2 replies
❔ Implement JWT to my WebAPI .NET 7.0 project - First time
Well, now I created a
Post
method for login
in one of my controllers, I don't know if I have to create a custom class for this, or what, maybe yes, I guess something like Auth
controller with this Post
method, I wait confirmation.
For the moment I pasted this code in one of my existing controllers for try it:
I found this code on web, and I adapted it by changing the login system, and creating a fake login for now.
It seems all clear, only I don't understand the GenerateJwtToken
method, if I'm not wrong it's never called.
Forgot to say that's before the GenerateJwpToken
method snippet, is written that I have to implement JWT token logic without further explainations.10 replies
❔ C# WebAPI - how to make a field 'optional' ?
Oh, damn it was easier than expected.
I left just it without the
?
for avoid blank request, but I didn't mind good.
Regarding the inside code I think it should works good, only one thing, for some reason, yeah obvious reason, if all fields are sent in blank, the output will be all elements.
Which could be a proper way to make sure that at least one field is sent?
Could an if
with multiple condition works? that maybe return some response code.
Actually I did in in this way and it seems working, idk if is there a more elegant way to write the code.
Now I'm just wondering if I could go on or if I should add some other code in order to get it more efficient.4 replies