Click on a right click menu - selenium

I'm trying to click on a button from a right click menu with nightwatch.
I have tried that:
.moveToElement('#nightwatch', 10, 10)
.mouseButtonClick('rigth')
But then, I need to click on a button from this menu, but I cannot. The menu is open and close inmediately, don't pause until I click on the button.
Anybody knows why?
Thanks
EDIT:
I tried with other websites, but the same problem remain:
browser.waitForElementVisible('body', 5000)
browser.moveToElement('#tsf', 10, 10)
browser.mouseButtonClick('right')
browser.pause(8000)
With www.google.ch
But the right click menu never appears.

Related

Unable to click on element in menu

I am not able to click on the button, how you can see on the picture. This menu is visible, when you click on Tabellen button in the main menu. It is working manually, but when I try my selenium code, it is not working. I try different type of select it, I tried also waits. I tried xpath, cssSelector, ID. What is strange, selenium just click Tabellen button from main menu, but that menu after that just blink and nothing happen.
Please use this example. You need to correct XPath if I have made a mistake.
driver.find_element_by_xpath('//*[text()="Tabellen"]').click()
time.sleep(5)
driver.find_element_by_xpath('//*[text()="Tabellen"]//*[text()="Standorte"]').click()

How I can inspect the elements that appear while mouse click, disappear while mouse leave

I want to inspect the YouTube settings menu element in chrome-developer with c# selenium.
The YouTube settings menu element appears on mouse click, but disappears if the mouse is moved out, so I cannot inspect the element in chrome-developer.
Any ideas?
ctrl+shift+i, then try the "Sources" tab, then go to the file you're trying to debug, then add line breakers. Next refresh the page. Here's an image of what we're looking for, inspected the google.com page for this one.
Once you have reached the line break for the mouseclick on the debugging, you can go to the elements tab, it should have the elements currently paused on the screen.
Visual studio and Chrome Browser as half of the Width of window
Breakpoint after click
At chrome browser, press F12 for inspect
We can find the settings dialog element in inspect tools area.
We must not click the html body area(Red Area) while debugging.

Why vuetify tabs slider disappear when copule with navigation-drawer?

I'm coding a layout with tabs but don't know why slider-color of a tab was disappeared.
Here is demo: https://codesandbox.io/embed/vuetify-tab-0fyyy
Here is my video test on Ubuntu FireFox version 57.0.1 64bit: https://www.dropbox.com/s/wmxsajsunwd9tur/vuetify_tabs.mp4?dl=0
Step as follow:
At tab1, the "events" tab was actived with blue line
Click tab2
Click "MENU" to open side-bar, then click background to close
Click tab1, then you will see the blue line disappeared
Many thanks for any advice!

How to Inspect Element using Safari Browser

I am developing websites and creating applications. I want to know how to inspect an element through web browsers like safari.
In normal Chrome, Firefox, Explorer or any other browsers, we will right click the mouse button or press Function Key F12 to view the Inspect Element. But it is not happening in the case of safari browser.
Share your thoughts!
In your Safari menu bar click Safari > Preferences & then select the Advanced tab.
Select: "Show Develop menu in menu bar"
Now you can click Develop in your menu bar and choose Show Web Inspector
See the detailed guide here for more info:
LINK
You can also right-click and press "Inspect element".
EDIT
As suggested by #dennis in the comments: If you dont see "Show Develop menu in menu bar" you may need to run DevToolsSecurity -enable in the console before the option is visible
Press CMD + , than click in show develop menu in menu bar. After that click Option + CMD + i to open and close the inspector
in menu bar click on Edit->preference->advance at bottom click the check box true that is for Show develop menu in menu bar now a develop menu is display at menu bar where you can see all develop option and inspect.

How to click on alert box ok button using nightwatch.js

I am working on ui automation testing using nightwatch.js, i am struggling on a point, i want to click on alert box's "OK" button but i am unable to do it because i didn't find anyway to press alert box's "OK" button on browser using nightwatch.js.
is there any way please suggest.
You can use the Selenium acceptAlert protocol. It can be used like this:
browser
.url(APP_ROOT)
.waitForElementVisible('.classThatOpensAlert', 2000)
.click('.classThatOpensAlert')
.pause(1000)
.acceptAlert()