FireFox button to open a specific URL with a parameter? - firefox

I'm looking for a way to write "xyz" in FireFox, and when I press a button, a URL of the form "http://www.something.com?ID=xyz" will open.
How Do I do that?
Thanks!

you can add this line as a bookmarklet in Firefox
javascript:window.location.href=document.location.href+'?ID=xyz'
When on a page, click on the bookmark and '?ID=xyz' will be appended to the URL

Related

Chromecast debugging using Chrome browser

The instructions on Google site stated that for Chrome browser:
Copy the URL text starting with chrome-devtools://devtools/remote/serve_rev..., open a new tab, and paste the URL text into the URL field in Chrome.
But I could not see any of that text. (see image)
What have I missed?
Just click on Remote Debugging(AppEngine). That will open the debug console, which should contain that url. If you're on Chrome already though, there's no need to copy the url and open it in a new tab. The point of copying the url is to bring it into Chrome.
Make sure that you also enable scripts. The right most portion of the url bar should have a shield icon. Click on that to enable scripts.

Firefox: how to add textBox for a URL?

I am new to development of firefox tools.
Need to implement a text box similar to Google search box shown in the toolbar in my firefox bowser...and when i click enter...the URL
http://<URL>/
should be appended with the value that i have entered in text box and open the URL in new tab...
The problem is i am not able to find good resource to do the same.
I have tired to implement add-on but i guess that is not required.
Can you please help me on the same?
Please refer to the Pic below for more info...once the user enter the BUG ID then the new tab should open with the appended URL i.e the URL will be
http://<URL>/bugid

How to handle new browser pop up after clicking a js button in Watir?

I am trying to using watir in ruby, I am able open a browser,
enter some values to a username/password form, but then I press enter, then I click the submit button (actually it is pressing an enter, it is easiler to code), it would pop up a new browser windows for our application, then I found I have no control to the new browser. What can I do?
In addition to my problem, the new browser window got no menubar, no toolbar, no navigation bar, thus I cannot open the IE developer toolbar to find the name of the element in the webpage in the new browser.
By the way, my app can only support IE.
I tried the attach method, but it does work:
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-class.rb:302:
in `attach_browser_window': Unable to locate a window with title of (?-mix:New browser title) (Watir::Exception::NoMatchingWindowFoundException)
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-class.rb
:150:in `_attach_init'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/ie-class.rb
:144:in `attach'
from test1.rb:36
Attach method is able to handle new window.
http://rdoc.info/gems/watir/1.8.1/Watir/IE.attach
for example
browser = Watir::Browser.new
browser.text_field(:id,'username').set 'username')
browser.button(:index,1).click
# popped up the new window
popup = Watir::Browser.attach(:title,'Foobar')
If you will use only the popped up window, you can overwrite browser variable instead.
You could try to authenticate like so:
examplehost.com/authentication?user=foo&password=bar
You could also try to remove "target" attribute (which is probably equal to "_blank") of that authentication form ( i'm pretty much sure you should be able to achive this with watir )
EDIT:
Also, there's this option:
ie2 = Watir::IE.attach(:title, ‘New Ie window, opened upon form submit’)
it can also attach by :url instead of :title
ok, there's possibly this solution that might work:
b = Watir::Browser.start "http://yourpage"
b.execute_script("document.getElementById('your-image-id').onClick = function() {}")
so, the idea is to get that image and overwrite it's onclick event

Is there a way to use watir to open a link in a new tab or window in firefox

I have a web application I am automating with watir. The application has a browsing page which shows thumbnails for a set of templates. Each thumbnail is a link to the template. I need to open each template in a new tab or window and take a screen shot or print a pdf of the template to verify that it opens correctly and looks correct. Then close that tab or window and return to the template browser to open the next template. I need to do this on firefox/safari chrome and IE mac and windows.
Why not open it in the same tab, take the sreenshot, then go back?
I haven't used Watir, only Selenium, but it looks like Watir has a back method as well. If not, you can probably store the URL of the page with the thumbnails and then open it directly by URL.
You can read the url of the link, store it in an variable, open a new browser window and then with ie.goto(url) you can open the link in a new browser.

How to handle popup whose ID value in the URL changes each time the popup appears

I'm working with the WatiN tool. I've a scenario where i need to check a checkbox and click on an ok button in a popup window. i've used AttachtoIE method and used the URL attribute to attach to the popup window. Now the problem is that the URL contains an ID attribute, and its value changes each time the popup appears.. how can I handle this or is there any other method other than AttachtoIE? please give some suggestions.
Thank you.
You can use Find.ByUrl(neww regex("some regexe expression")) to ignore the id part. Or if you are sure that you have just one IE instance open before the popup is opened, attach to to the IE instance which has not the same URL as the browser you opened the popup from.
HTH,
Jeroen

Resources