I have to click on a jquery dropdown with selenium. Found that
MouseUp[xpath=//a[contains(text(),'itemname')]
works in IDE. But am at loss, as I cannot simulate this in ruby webdriver. Is it possible to simulate it with actions class? If so how? Kindly help me out.
Check out the Filling out forms part on the Selenium WebDriver Docs http://seleniumhq.org/docs/03_webdriver.jsp#user-input-filling-in-forms
This should lead you in the right direction for your problem.
Related
I have to automate on button "Accessibility Checker" which will come after inspecting the web page as shown in the picture. Please suggest me how to automate this as of now I am using UiPath, but that is not working (not able to select a correct Selector).
As far as I know chrome is a bit tricky since it has a lot more background updates than other browsers. So use something like IE if you can. Other than that, you can use anchor base activity with image activities. I get accurate results with that solution on cases where I am not able to use clicks.
In my Ruby on Rails 6.0, I'm trying to test a page that has access to the camera.
The problem is that when I visit this page, there is a popup message that I should permit to use the camera.
This is breaking my tests, how can I click allow to that popup or somehow give permissions to the camera to Selenium WebDrvier.
Thanks in advance
I am using latest fireFox version and not able to turn on firebug. It is showing deactivated. can anyone help me how to activate it? As I am not able to search xpath.
Firebug is no longer available in Firefox, now replaced by the Firefox Developer Tools. There's a guide for migrating.
What you are seeing are actually the Firefox DevTools. When opening it the first time, there is a hint explaining the transition a little:
Note that even the Firebug toolbar button disappears with the release of Firefox 57. The backgrounds are outlined in a related blog post.
Unfortunately, the DevTools do not provide an XPath search within their Inspector yet. There's an enhancement request filed for this feature, though.
Having said that, you can at least copy the XPath to an element via the context menu:
Furthermore, if you need the XPath for automated testing like Selenium, you can use CSS selectors in most cases instead, which can be searched for using the search field.
I am using watir web driver for web automation testing. I have to handle the popup window dynamically which is without title. This popup will display at any case. so i need to handle globally. Can anyone help me to solve this issue.
If something like that shows up intermittently, I would (assuming you're using cucumber) make a page object for the pop up, and use it in an AfterStep hook.
Something like this
AfterStep do
pop_up = PopUpPageObject.new(self)
pop_up.close if pop_up.present
end
I want to capture a webpage as an image. I am able to do this using a firefox extension using context.drawWindow method. Now I want to strech myself and see if I can do this using a bookmarklet :)
I remember reading somewhere that context.drawWindow() works only from the firefox toolbars. I dont know if that's still true or not.
Can anyone shed some light if I can execute context.drawWindow() from a bookmarklet or no?
Thanks
Kapil
You can't, since bookmarklets run with the permissions of the page, and drawWindow is chrome-only (can only be used by Firefox UI and extensions, not Web pages).