Selenium IDE Not Typing Entry - selenium-ide

I am a beginner with Selenium, and I am trying a simple case of going to Wikipedia, entering some text (e.g - James Joyce), and asserting that James Joyce is on the page after clicking the "go" button. However, Selenium is not registering that I am entering "James Joyce". When I stop recording and view the commands, all I see is that Selenium goes to the correct page, but clicks on the button without typing the data. Is there a way to get this to work properly?

I think that is a problem with Wikipedia. Not sure why it doesn;t work. You can enter the command manually. For Selenium IDE that is Command: type, Target: searchInput, Value: James Joyce.

Selenium doesn't always record an action. It depend on how the page is built.
You will have to Manual create some inputs.
One work around I have is to manually enter the data, then highlight it and right-click.
You should now have a option that will give you the target field. Click on it
and manually change the command.

Related

How do I select elements within div frames?

I am pretty new to Selenium IDE, hoping to use it with a certain web app which a client would like to be able to run automated tests for after periodic uplifts. The tests would all involve only clicks and text entry.
I cannot get the application to execute clicks on certain form elements on specific pages.
My test so far is simple. I am simply navigating to a page and trying to click an icon whose target, according to the IDE, is "css=#MGOpenButton-btnEl > .btn-icon". The Selenium IDE will register the click as having been performed successfully (i.e. no failures) but the actual desired output of the click (i.e. a pop-up search box appearing) isn't actually happening. I have tried click, click at, double-click, mouseover before click, all to no success.
Reading back through some other topics, I thought it may have something to do with the element being embedded in frames, but if that is the case I'm not sure how the click is being read as successful by the IDE. The second thing I'm wondering is if it might not be playing nicely with Javascript.
Is it common for the basic IDE front-end functionality to fail when a webpage incorporates Javascript?

Incomplete automation of 2 clicks in selenium IDE

I used selenium IDE(katalon plugin) in chrome.
I have a school db of 300 students.
I need to update 2 fields in every student profile -2 drop down menus. Select "no" in both and click "Save". I automated it in the plugin. Now, I don't know how to go to every profile and do same.
The right way is to use some while loop.
The db is in this form:
https://e.edu.kz/nedb-passport/student?school=3659&student=4314369
https://e.edu.kz/nedb-passport/student?school=3659&student=6546456
https://e.edu.kz/nedb-passport/student?school=3659&student=4785691
I did a pretty stupid thing - I simply change the student ID at the end and run the script, click 'play' in the plugin.
This is not proper automation, how do I do this?
Maybe switch to code and write all the selenium cmds in java?

Visual Basic - Button on website doesnt have an ID

I'm trying to build a application which logs you into instagram. I've got it to input the username + password no problem
However, when i go to get the ID for the submit button their isnt one.. and i've been using .GetElementById. Is their anyway around this?
I'm pretty new to visual basic so please dumb it down to simpleton terms!
Thank you in advance!
Getting elements by ID is not the only solution. You can always get them by it's names or you can find the element by yourself. Just look at the whole page's source code, search for something spesific that button carries and invoke it. Visual basic's library can be insufficient for situations like that.
WebBrowser1.Document.GetElementById("username").InvokeMember("select")
WebBrowser1.Document.ActiveElement.Focus()
SendKeys.Send("{ENTER}")
This is the code that works! Change the "username" ID to the form you will be changing, then it focuses onto it and presses enter! Simulating the submit button.

K2: How may I open a file in a new window unless I already have such a window open?

I have a K2 Smartform that displays a list of file names. When the user clicks a file name, the program opens that file (all of them are PDFs) in a new tab in the browser (IE). This is good so far. If you click on a second file from the list, it opens in a third tab. That is not what the user wants.
They want the second file selection to open in the same window as the first file.
This is the process I can see:
Click on the file in the list.
Open in a tab.
Click on a second file in the list.
If there is already a tab open with a file from the list, open this file there. Otherwise, open a new tab for the file.
I suppose automatically closing the first tab when they click on the second file would accomplish the same thing.
How can this be done?
When you deal with opening links, first of all, what you can do is limited. Indeed, browsers (IE, Chrome, etc...) can be configured by the users to open links in new tabs, windows, etc... and you as form developer cannot change that.
I have made a jsfiddle to reproduce your situation and propose a solution you can test. I don´t guaranty it will work as I use a Mac but I also describe a better solution below.
You can find it here:
https://jsfiddle.net/chevdor/45k40npv/
I guess the first example (#1) is what happens for you at the moment.
Using the 'target' attribute, I tried to implement a solution that may work for you. Click on #2 and #3 and check whether this work.
I cannot test that since I use a Mac.
You can read more about the target attribute here:
http://www.w3schools.com/tags/att_a_target.asp
Another solution that would give you more control is to use an iFrame control. I think it comes in standard with SmartForms now. If not, you can for sure get it from the community site. I recommend you create a new View with this iFrame and define one parameter (string) called "url".
Let´s speak in K2 rules languages :)
"When the parameter changed", "and the parameters is defined", if you 'Transfer data' passing your URL to the iFrame control, it will display your doc. If the user clicks another document, it will update the SAME iFrame. With this solution, no tab will ever be involved.
Please note that it will work great for any document supported by your browser. Some types may require a plugin. Other documents (ie zip, etc..) will NOT appear but be downloaded instead.
I hope this helps.
Best regards,
-chevdor

Stop form from open when no records

I have a data entry form that when it closes opens another form for further updating the just newly entered data. However, at times no further update is necessary. How can I suppress the 2nd form from opening when there is no need for further update? Presently the form opens even when there are no recordsets present. (need a similar Event like for the report "On No Data")
Have a bit field such as a checkbox with default set to true open second form. Uncheck it to avoid the system from opening the next form. You will need to handle this in your code and check if that check box is checked or not.
Of course we will need more details such as why you are currently opening this second form...in addition, cant you check if any changes were made and if they were then open that second form else dont? Also what lang ?
Without knowing more about what you're working on, I'd say you would have to modify the process that shuts down the first form to check if the second form is needed. In .NET, for example, you could add code to the OnClosing event for a WinForm to check. If it's needed, open it as normal, if not then don't.
Subject: Tool Kits. Tool Kits consist of 1 or more tools. If tools already exist, no need for 2nd form to pop up. If tools are new, I need to fill in one of the 3 fields in the drop down listing. I like the idea of adding code to the OnClosing event, but do not understand what you mean by WinForm.