I'm using VB6 and I'm trying to do the following:
I have a command button that execute a while statement. in this statement I'm loading a new form with:
Load FrmPayment
FrmPayment.Show
I want the program to brake until I click a button in the new form, and then start from the same point I left
I tried looking the web for an answer but couldn't find anything that helped.
How can I do this?
By showing your new form modally the new form is the only form in your application that responds to the user.
Load FrmPayment
FrmPayment.Show vbModal
I am writing a file deletion script using selenium-webdriverfrom the webpage. Now when I clicked on the RED cross button as in the below image,getting another confirmation window on the page.
Any idea how to click on the OK button?
Have you tried with below logic?
Alert alert = driver.switch_to.alert
alert.accept
The below code finally works to handle the picture mentioned modal window:
driver.switch_to.alert.accept
i have a very simple firefox addon that essentially just displays the total number of open tabs.
So far it works beautifully, however after right clicking on the toolbar and selecting Customize… it only shows the default text until a tab is opened or closed.
i presume that i need to add an event listener for this event and call updateWidget(), however i can't find it in the API doc. So does anyone know how to do it?
Verified as bug, see : bugzilla.mozilla.org/show_bug.cgi?id=773297
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
I'm writing an editor that is updating a WYSIWYG view in the browser. As this update can happen often i don't want to open the page in a new tab. Is there any way other then using the ugly way of emitting keystrokes to enter the Open URL command and entering the URL (I'm doing this right now, but it's buggy if the user interacts with the system in the meantime).
I tag this as firefox but comments on other browsers are welcome.
Script given below changes location without opening new tab. I think it would be helpful.
TYPE IN ADDRESS BAR:
javascript:window.location.href = "http://www.yahoo.com";