Autofill by Selector not working on all Pages - javascript

Normally, i Login to formbased login pages by executing the following:
cefsharp_browser.ExecuteScriptAsyncWhenPageLoaded("document.querySelector('#input-email').value='myemail#test.com';");
cefsharp_browser.ExecuteScriptAsyncWhenPageLoaded("document.querySelector('#input-password').value='mysupersecretpassword';");
But now i´m actually struggeling to login to a Page(https://lagerimgriff.app/login) on which the code above doesn´t work.
The Form is beeing filled with the Values shown above but injecting the Values that way or by ID, the Login-Form doesn´t realize any input, saying the field beeing empty.
I´m not a WebDev but it seems to me that there is some intermediate JS which is checking the Fields for validity(f.e. the mail must contain # followed by a . ), maybe that is the Problem?
As this seems to be JS related i´ll tag it too.
Is there any way of archieving an automated login on that Page?

Related

Is there some way to simulate keyboard input or setting the input value WITHOUT using javascript element.value?

I know this is confusing and difficult because I have not code to show. Thats part of the problem, I dont really understand what is happening and I came here for some ideas.
In my job employees need to connect to two online systems.
The first one is programmed by me. Basically employees need to put some login credentials to enter our internal system to see their calendar, tasks, etc. Everything is good until here
The second system is a CRM site provided from an external providor. Users need to login into that system and the login credentials ARE THE SAME than the first system we have. We are loading this secondary page as an iframe inside the first system.
Considering our users already filled a login/password page I would like to fill automaticaly the second login form with the data we already have.
The problem is that somehow the login form of the CRM have some sort of validation system and if I use javascript to paste the login/password the "login button" remains disabled. The value is there and I can see it in the input field. That button only validates if an user fills the value with the keyboard or paste from the clipboard.
That is all I have at the moment and I dont know how to continue. Is there any way to simulate keyboard input or to ask the page to validate the content of the field? Any idea will be very appreciated.

How to access an input field and write text to it inside an iframe?

I need some guidance from you. I am trying to automate a process with WinAutomation software and i need to open a web page and just insert login name, password and press log in. All seemed very easy but i got stuck because i first time encountered iframe. The login is in an iframe and i cant access it. What I can do is execute javascript function. I wanted to ask is it posbile to access it using javascript and populate those fields with text? Tried googling it but every answer i find people are asking how to access it on their own page so they have more control over it than I do. I just have the webpage name and that's it. And I have minimal knowledge on javascript.
The page is: https://mit.nykredit.dk/erhverv/?kort=2
I tried just some simple code with getElementById but the ID of the input field seems to change everytime you refresh the page. I would be really grateful for any help.

mailchimp modal integration "There are errors below" with bootstrap hidden-xs and visible-xs

I'm having issues with the modal mailchimp pop-up signup form on this website. (tip if you want to view more than once, delete your cookies).
I was trying to add another field besides email and somehow the form stopped submitting, so I reverted to the original code. However, after revering back to the original code, the popup was showing an error of "There are errors below" after the user submits his/her email. After further chrome console inspection, I noticed that if I delete the form with bootstrap's class visible-xs entirely and then remove the class hidden-xs from the other form, it seemed to clear things up.
The user can now submit his/her email on mobile or desktop. But I feel like there's something strange happening. Did mailchimp changing something and that broke the code or am I'm just missing something? I have the form with visible-xs commented out so you can see when you view source.
On top of this I'm trying to add another required location field. It's letting the users submit without selecting a location (even though it contains the html required attribute. Any ideas how to ensure the form isn't sumbitted without selecting a location field? (This is also current commented out so you can see it in the source code.)
Maybe someone has tips on best practices for all of this? Any idea why I have to delete one form for the whole thing to work? Any ideas to code this modal form better? Ideas to get the location field working? Thanks!

User account creation and validation (BigCommerce)

I'm having a little trouble with my account creation form.
first of all, my site is on 'BigCommerce', but they can't help me because i changed the design and they don't deal with design related issues.
The problem is like this:
If I fill every textbox with the right information and click submit, everything is just OK. I'm getting transferred to the 'Thank you' page, the new user is added and everything is just fine.
But, If I type something like a wrong E-mail address, Two not-matching passwords, leave some text box blank or something like that and click submit, the form is all blank and I have to start filling the details all over again.
second, I'm getting redirected to another page (with a new and empty form), and the error is written on the top on the form, instead of getting a pop-up message with what's wrong on the same page.
so.. this is the account creation page:
​
http://pastebin.com/pB5mrbtf
​
and the javascript code its redirecting to
http://pastebin.com/gLw5WCEQ
Please help
remove the autocomplete="off" for your text removing issue and for others pls attach jsfiddle link.
Also keep your old id's and class's for validation, otherwise you need to update your js file functions also. please provide jsfiddle link

Javascript submit won't work on server?

I have the oddest bug. I have a simple html form. You can see it here:
http://www.learndoearn.org/almost_real_products/food_services.html
This form is just for demonstration purposes only. It doesn't really submit to anywhere. All I want it to do is validate a few fields and if those fields are filled in, redirect the user to a thank you page. This works fine if you physically click on the html file to open it, HOWEVER...if you try to access this html page via the domain name (as seen in the link above), clicking the submit button (once all necessary fields are filled in) doesn't work. It simply doesn't do anything.
The redirection to the thank you page occurs in this file:
http://www.learndoearn.org/almost_real_products/js/forms.js (it's about halfway down the js file where it says window.location = "http://www.learndoearn.org/almost_real_products/thanks.html";
Any idea what I'm doing wrong?
Thanks
The link you have provided to the ajax call "bin/MailHandler.php" is returning a 405 error. Due to this the success function is not being run and the redirect does not take place.
Modify your php file to return success irrespective of the input if its a dummy and it should all work fine.

Categories

Resources