We have one website (third party software), that I am only having issues with. I am getting the following error:
java.net.ConnectException: Connection refused: connect
The only thing different with this button than other buttons in this software/site and others is this form action.
<form action="https://test.xxxxxxxxxx.org/customer/account/createpost/" method="post" id="form-validate" class="scaffold-form" enctype="multipart/form-data">
It clocks and waits and returns the above message....but the form has been submitted and continues to the next screen, but Selenium loses it. I have no idea if that form action has anything to do with it, but anything outside of it, will not lose control.
Any way to work around this? Anyone else run into this issue?
It is because of the form action. I had to change it from a "Click" action to a submit. I found it from this link
Selenium Webdriver submit() vs click()
Sorry..I have been doing this lately. I ask a question and it prompts me to look up the question in a different way that garners different result, and that is what happened this time.
Related
I have a Lotusscript agent behind a submit button that takes a while to do everything....the user needs to know it is processing so that they do not click the button multiple times.
Am using #Command([RunAgent];"agentname") to kick the agent off.
How in Lotusscript could I add some kind of 'processing' indication, either a progress bar or a spinner or something? I suppose I could embed some javascript inside the lotusscript, but hoping someone has a clean example or some tips to do this.
Maybe hiding the submit button at the same time if I use javascript via a display property on a surrounding the button would help too.
You can't do this with LotusScript coding, and while hiding the Submit button is a good idea, you're going to have to know when to unhide it. A simple #Command([RunAgent]...) call won't give you a way to do that.
You're going to have to redesign your form to include a significant amount of JavaScript and make an AJAX-style call to invoke your agent asynchronously via a ?OpenAgent URL sent in a POST request via XMLHttpRequest. Your main JavaScript code will continue after the call and launch the spinner, and the callback that you set up to handle the asynch return from the XMLHttpRequest can then either transition to a new page or stop the spinner by setting a variable that the spinner is checking once every second or two.
I and my co-workers can't seem to agree on what the best practice should be when it comes to Vue and popups.
The question is as follows:
You are on the main window, you get the data from the backend using REST API and you notice an error. To fix it, you go to an edit popup and after hitting save what should happen?
Should you call the API from the popup?
Emit the changed data and let the main window call the API?
...
This is very interesting question but I think the truth depends on your whole architecture, implementation and approaches you use.
Say, if you worry about the "separation of concern" you wouldn't give a popup any access to API because its work is to show you some data as a popup, return data, and that's it.
On the other hand, how are you handling errors? What if an error occurs when user works in popup? Where do you show error?
Another question is the usability. For example, if error occurs when you save data, if it's done by the main window, you are going to:
Show the error message
Make user to click some button again to show the popup
Fix a problem and click the Save button in it.
But if you would access API right from popup you would avoid first 2 steps. Another concern is how you handle wrong data.
If you are still in the popup you easily can validate the data and cancel saving (or disable this button at all) but if it's done after the popup is closed it may be too late.
Am using vb.net in asp.net to create my project. I use also a bootstrap modal to get data from client.
In the modal I have buttons and textboxes that get the data from user. there is a FINISH button that ends the process and closes the modal
the problem is that the other buttons are not supposed to close the modal, but make some calculations and processes. At one hand I need the postback in order to tiger the events of the buttons, And at the other hand the post back closes the modal, and i have to re-open it at the end of each process. This action makes the modal close and re-open after each click, and it is not Nice or Convenient
I thought that if I disable the postback of the buttons, and use the OnClientClick to catch the client click, this will work for me. But the Question is how can I make the OnClientClick Call a server side code (Sub)?
Any other Suggestions are welcome :)
OnClientClick is just that the CLIENT CLICK it doesn't translate into a server side method. Each ASP.Net server control has an OnClick event which is associated with a server based method, but that would give you the exact same scenario that you're dealing with now.
In this situation, I would have the secondary buttons (i.e. the ones that don't close the modal by behavior) use AJAX to send/receive data from the server (accessing an ASHX file or some other handler/WebAPI). This removes the entire postback situation entirely which sidesteps the issue.
Unless I am missing a step, I have done the following:
Drag webbrowser control onto form (WebBrowser1)
Drag button onto form
For button click action I did
WebBrowser1.Navigate("http://www.google.com")
and I get "cannot display the page"
It does this with whatever URL I use, whether I put http first or not.
Any idea what could be causing this? Could it be some type of security restriction on my machine or network that prevents non-browsers from accessing the internet?
It's a security setting on my machine preventing it. Thanks all.
I am having trouble getting Selenium IDE to click the Submit button on one of my webforms after having selenium open and fill out the form. I am using the clickAndWait command and identifying the button by its ID:
<td>clickAndWait</td>
<td>id=ctl00_ContentPlaceHolder1_OSVFHResults_btSave</td>
<td></td>
Interestingly, if I write a script that simply opens the form and clicks the submit button without filling it out, I am not having any problems. My problem is coming specifically after I've asked Selenium to fill out the form. Additionally, if I try to manually click the submit button, it doesn't work if the Selenium script to fill out the form was run before my manual input. If I manually open and fill out the form, I have no problems clicking submit, and Selenium works for all of the other form's submit buttons on the site. Anyone have any ideas?
Instead of filling form with type command you can try typeKeys one. It simulates keystroke events on the specified element, as though you typed the value key-by-key and probably enable your submit button.
It sounds like some javascript event unrelated to click() (such as mouseover or onkeydown) is attached to one or more of the form fields and is responsible for enabling the submit button.
You'd have to look at which exact events are being fired, either by looking at the source with something like firebug, or by using a javascript debugger. Then modify your Selenium script to make sure the same events get triggered.
After type the values in the form just try "ClickAtandWait" instead of "clickandWait"..i also face the problem once and it gave hands once..
selenium.clickAtandWait("locator", "position");
if you know the exact "position" just put it, otherwise leave it as an empty string.