From editor to web page in fewest possible steps - firefox

Currently I use FileZilla, FireFox and Sublime 3. Steps between editing and seeing result:
while (!allFilesSaved) { click; Ctrl-S; }
while (!foundFileZilla) Alt+Tab OR clickIcon;
while (!filesHighlighted) highlightFiles;
Enter OR dragWithMouse;
while (!foundFireFox) Alt+Tab OR clickIcon;
while (!atCorrectPage) locatePage;
if (wasAlreadyAtPage) F5;
That's at least 4 steps, assuming I have one unsaved file and have it as the current tab in Sublime, and also that the page doesn't autorefresh. How can I minimize the number of actions required?

I recently started using rsub with Sublime, and I absolutely love it. If you have ssh access, this could be a great solution.

Related

The window terminated unexpectedly [duplicate]

I am trying to open a folder that I opened before, but it crashed.
I can open other projects, and restarting the computer didn't help.
Maybe it's because I had a big file opened (400mb) in this folder, but I cant close this file because the vscode crashing every time when I tried open the workspace..
https://github.com/microsoft/vscode/issues/126127
https://github.com/microsoft/vscode/issues/130375
I had the same problem.
Just delete the folders under %appdata%/code/backups/ and restart VS.
I solved the problem by restarting my computer and then opening VS code from a different folder.
To open large JSON files, I use Dadroit JSON Viewer, thus preventing the problem from repeating itself.
Not worry much about that!, same issue occurred in my pc but there is easy steps to fix this error as following.
solution: Enable "paging files" option OR increase virtual memory.
steps:
1). Right click on "ThisPC" or "MyPC" and go to properties. then go to "Advanced System setting". [ you can also find that using SEARCH button ]
2). then click on settings of Performance block. its open another pop-up window in that ,go to the "advanced" option .
3). you can see the Virtual memory section ,in that click on change button.
4). now first disable the checkbox of "Automatically manage paging file size for all drive".
-> and select the "custom size:"
-> in Initial size(MB): { you need to add the same value as recommended, which is also displayed downside section }
-> in Maximum size(MB): you need to enter the value that you get multiply by 3 of your allocated RAM size.
for example:
your pc's ram is 4 gb then you can enter 4098*3= "12288mb".
then set it , click ok, ok, ok, and then just RESTART your pc. 🥹
hope god will help you.
It's easy than you think, you just need to update your laptop. and try to use Vs code again you will see that it works.

Disable Firefox auto update requests

Hope I'm writing that in the relevant platform..
I'm working on a script that analyzing requests while browsing sites with Firefox.
I always see requests to aus4.mozilla.org, even after I changed the "Auto-Update" option in the browser to 'Disable' mode.
Does anybody faced with this problem before? How can I turn it off?
Here is how you can turn off Auto Updates on Firefox from Windows:
Run Regedit in windows (Must have admin right)
Expand HKEY_LOCAL_MACHINE > SOFTWARE > Policies
If the 2 folders Mozilla and Firefox don't exist under 'Policies'. Create them as per the following:
-Right click on "Policies" folder, Select New > Key then enter "Mozilla"
-Right click on "Mozilla" folder, Select New > Key then enter "Firefox"
-Right click on "Firefox" folder, Select New > DWORD (32 bit) value then enter "DisableAppUpdate"
-Double-click on "DisableAppUpdate" to modify Value data to 1 (hexadecimal). This will stop mozilla from downloading and updating Firefox;
It will show "Updates disabled by your system administrator"
To allow Firefox to update again; Modify the Value Data to 0 .
Weird, the option should work.
Double check that the app.update.auto and app.update.enabled configuration options are set to false (you can do that from about:config).
I would suggest using a better method to automate Firefox, for example Selenium. There are bindings for many programming languages, e.g. for Node.js.
Nowadays (65.0.2) disabling updates is relatively complicated. Here's the Windows solution:
In the firefox.exe directory, create one named distribution.
Inside distribution, place a filed named policies.json containing the following:
{
"policies": {
"DisableAppUpdate": true
}
}
Sources:
https://support.mozilla.org/en-US/questions/1232918
https://github.com/mozilla/policy-templates/blob/master/README.md

WatiN downloading files

I am trying to use WatiN to do some screen scraping type of work. It runs on our site on a scheduler. I have no need to see the UI, I just need it to do the work. I can navigate the sites with no issue , but when trying to downlaod the files I have 2 problems.
Using IE 11 when it comes time to download , I get stuck on the open/save dialog that pops up. I have tried and tried and tried everything to have IE 11 auto download files, but to no avail. I edited the registry, and tried every option in the security tab, but no luck. I tried using SendKey.Sendwait("{TAB}"), to mimic what would need to be pressed , but I get "access denied" I think the "ui" is locked.
so I tried Firefox, firefox is easy to configure "automatic downlaods" .... but
FireFox wont even connect, I get: No connection could be made because the target machine actively refused it 127.0.0.1:9997 I installed the appropriate jjsh addon and install it globally for all users from the command line, but still no luck.
Any suggestions on how to disable that yellow bar that IE 11 puts at the bottom of the screen to annoy you , or what I might try with firefox? I believe configuring IE 8 to disable the yellow dialog bar is possible, but I am on a windows 8 machine , so I'm stuck with IE 11, or possibly 10.
You can keep trying to find a solution but that solution will probably break in a next release of IE (based on previous experience) to be able to finally solve and be future proof (if there's such a thing in development....) I would suggest to navigate to the page that has the link and get the HREF portion of it and once you have that link just do the download using other ways, like the following:
(this is just pure C#, not watin)
string downloadURL = "http://example.com/retrievePDF.jsp?id=XXXXX";
client.DownloadFile(downloadURL, #"C:\temp\" + fName + ".pdf");
you should replace the downloadURL with the value on the HREF of your download link and you will be able to find the file where you specify it.

Tools/code to automatically click ok on dialogs

We have an 'enterprisey' system with a scheduling component which gets floored if any dialogs come up. If any modal dialogs come up in the processes it is running, it gets 'paused' and can't kick off any new processes.
Excuse me a minute ...
*goes outside*
*laughs*
*cries*
*comes back*
.. ahem ... so anyway we need some sort of tool/technique that can lurk in the background and automatically detect specific dialogs and click OK on them. Any recommendations?
The offending system is running in Windows XP.
(NB: changing the third-party-enterprisey system or making its developers sit on the naughty step until they improve it are not options in the short term)
From this similar question I found:
Buzof by Basta Computing
which did the trick.
There is also a product called DialogDevil which looked promising but didn't work in our situation for some reason.
AutoIT is absolutely perfect for this. You can use the tool to help identify the dialog, write your own simple code and distribute the "auto clicker" via exe. It lurks in the background by running from the task tray.
DialogDavil will require exact same parameters on your dialog (for which you want buttons to be autoclicked) every time that same dialog pops up. And thats why it didnt work for me in first pass. Then i changed the control file at the following path to remove the changing items (a text box text in my case)
C:\Users\userName\AppData\Roaming\DAIR\DialogDevil\control.xml
And then it worked like a charm.
HTH,

Problem with Pop-up Windows using Selenium

I'm new to the testing world, so my question might seem a lil' bit too naive and stupid. At risk of looking/sounding stupid, my question is this:
I've been trying to test the contents in a pop-up window on my company's web app. I've figured out how to detect the pop-up window for now, but i can't get selenium to 'click' on the link inside of that pop-up window. there are multiple pop-ups in this web app so it's really difficult for a newbie like to create a test case.
I tried the click, clickAndWait, mouseDown and mouseKey as an option but it is still not working. can somebody guide me through this?
TIA,
Angela
When the popup appears you will need to move the context of the script over to the window.
You can do this by using the selectWindow | window_ID_from_the_link and then do the clicking.
If that doesn't work you may need to use the openWindow command to create the popup and then start testing against that.
Use getConfirmation/getassert/getprompt according to the type of the pop up you use .....By default they will be clicked with ok option by the server and you have to consume the message from the pop up for the other selenium commands to work correctly.............
The above suggestion is given from my experience in working with selenium RC used with perl..........
Perhaps you can try the FireFox Plugin. You can click through your application and record your steps. After recording the steps you can easily save it as some sort of file or unittest.
I'm not sure about the command you should use for the popups, maybe the firefox plugin will help in this manner (it will create your commands).
If you created the popup with a div tag, U can use following code to stop the selenium server until the popup opens.
int second = 0;
while(!selenium.IsElementPresent(mylink))
{
if(second >= 5)
break;
Thread.Sleep(1000);
second++;
}
After a popup opens, Now you can click on any link inside the popup.You have to use the below code.
selenium.click("id=popup_link"); (popup_link is the id of the link present on the popup)
Good Luck.
Not sure if this is what you are looking for, but if you want to click on something specific that Selenium is not able to handle - like browser pop-ups or other pop-ups, you can use Sikuli Script. Sikuli does an image comparison and clicks on the same - this is very powerful.
Here is the link: http://www.sikuli.org/

Resources