I'm working with the code of one application. I use breakpoints in chrome devtools in order to find problems in the code if they are there. But the problem is, that there are many cases with for or while loops.
And in such situations I should press the button "step over next function call" hourly. How can I skip loops?
I only want to skip the loop that I see on the way, but then I also want to see further what happens in the code step by step.
Is it possible to skip loops?
Or maybe You know another way about detailed code control?
Thank You!
Related
Im trying to create a script that works on two differents windows simultaneously, but everytime the script clicks, it opens the windows start menu without reason which hides part of my screen and cause FindFailed errors.
What can I do to prevent that ? What causes this issue ?
Clicks with SikuliX are not "simultaneously" but always sequentially one after the other.
So tell a bit more about your setup.
A relevant snippet of your script code might help as well.
Have you tried "run in slow motion", where you can better watch, where the mouse moves and clicks?
I've been trying to program my Sikuli bot to find a certain item on Google's webpage results, and then if it doesn't find either of two different things, then it needs to refresh the page.
What I've got is:
while not exists("1613966501287.png") and not exists("1613966531551.png"):
click("1613905413870.png")
wait(3)
//click(<image>) is to click the refresh button.
So far, it has been able to detect both of the images I'm asking to find and then refresh the page if it can't, so I'm assuming I've done something wrong with my logic of using while/not/and.
The current code will wait until one of the two images appear. In other words the 'while' loop will continue until bot images are not present on the screen.
I am recording a .Net application using Selenium IDE. Theres this scenario, that a textbox is presnt. I need to enter a name to search. As soon as i start typing, matching options come in a dropdown below. I have to select one of them, then the application goes to the next page.
The problem is, Selenium doesnt record this selection from the drop down. More over, when the script is typing in the name, the dropdown list is not being visible at all.. i.e. the ajax call is not occuring.
Please help. I need the solution code in Selenese or HTML, since I'm not much of a coder myself, and also, I am simply recording and playback, so I am not using Java or other scripts.
This question is great,
and so is the answer in this blog: http://blog.buberel.org/2010/07/howto-test-jquery-ajax-autocomplete-menus-with-selenium.html
other option to deal with this problem is to use a different way to insert your text into the text box, as described here: Can selenium handle autocomplete?
I wanna use these very simple features in Google Chrome Javascript console but I really cannot find out how (already searched in official documentation,multiple videos and posts...)
Writing more than a javascript line! (currently after hitting enter, the previous code executes). Moreover, is there a way to make the 'writing' area of the console larger? (multiple lines)
Typical undo and redo edit. Currently control+Z does nothing.
really weird,
Thanks in advance,
Pere
The Javascript console really isn't intended to do serious development in, but it's pretty good.
Shift+enter will let you write multiple lines instead of instantly executing the code.
I'm trying to make an extension for Google chrome which requires me to be able to identify the currently selected tab. I did this with the chrome.tabs.onSelectionChanged method, however when I switch windows this isn't fired. I plan to use chrome.windows.onFocusChanged to detect when the window changes then use the chrome.tabs.getSelected method. However the problem is that chrome.windows.onFocusChanged seems to be fired more than once. If I'm not mistaken, it returns window -1, then the first window created (usually 1), then the current window. If the first window is selected then it's fires -1, then 1.
Am I using the right method here? Is there a better way of doing this? If I stick with it I might need to keep track of how window changes which is a bit messy.
Kinda worked on my own solution for this. For anyone interested in doing something similar, what I did instead was to use the onFocusChanged as an indicator that there is a window change happening which then starts a requestListener. Using content scripts, I sent a request to the extension whenever there was a window.focus event indicating that the focus is already on that window. The requestlistener then just removes itself. Unfortunately this approach requires all tabs to send requests every time they get focus. Some more tweaking to fix that I guess but for the mean time I think that suffices since sending requests every time there is a change of focus doesn't seem to eat up that much resources.