I want to mimic mouse clicks on buttons etc. on a website which is already open in a browser(e.g. Chrome). Do you guys know if I can do this with Selenium? Or do you guys know how I can do this in general?
No, you have to launch the browser with selenium by initializing the driver. Selenium is proxying the browser so that your code can control it.
http://selenium-python.readthedocs.io/getting-started.html
Related
I am writing a script for web automation with SELENIUM and, in theory, I have two options to capture the data I need from the websites I am scraping:
I can let the script extract relevant information from each tag on the result pages.
I can make the script click on the browser extension button in my browser window and let the extension manage the data for me.
I know how to extract information by HTML tag, but when it comes to browser extensions, I have only found instructions how to install / uninstall them with SELENIUM, but no instructions how to "activate" them once they are installed.
I am using Firefox and would be very grateful if you could point me in the right direction.
I was not able to solve this problem in FIREFOX but in CHROME:
I created a browser profile including my extension and a key shortcut to activate it.
I opened that profile when starting the browser with SELENIUM.
I used SELENIUM to navigate to the right URL.
I used pyautogui to press the relevant keys and trigger the file download.
How can I download a file opened with a blob link via Selenium Chrome? Selenium chrome window shows the player on a black background. I am interested in downloading only with selenium. I use Python 3.6.
Screenshot of Selenium player
https://s8.hostingkartinok.com/uploads/images/2019/05/da6329528e2a577a7aaa0f2a7e613b63.jpg
Selenium cannot work unless there is a web page to insert itself into. Once there is no page, nothing can be automated. Maybe a right-click would be needed here and then maybe a robot for automating outside of the page code.
I was trying to automate the process of adding Chrome extension through Selenium Webdriver. There comes a dialog that asks user to click 'Add' to add extension. I am facing issue in this part.
Here are the things that I've tried but did not work :
Trying to treat it as 'Alert' and accepting it.
Trying to get its properties but as it is not part of web page we can not see its properties. its chrome's in-build dialog.
Keyboard simulator (hitting Enter)
I know we can use AutoIt but don't want to integrate it with framework just for single issue. Is there any other way you folks can suggest. One workaround that I an thinking if we can get a global keyboard shortcut to select 'Add' on the chrome extension dialog.
I am developing a selenium application in c#. Scenario in my app is like I am browsing to a web page and press a button so that the next window appears.
So,I want selenium to do like this..Once I click the button in my first webpage that browser should be closed and selenium should focus on the next appeared window. How can I achieve that??Any idea on this will be really appreciated..
Please look the following link
http://www.thoughtworks-studios.com/twist/2.3/help/how_do_i_handle_popup_in_selenium2.html
I hope This will be helpful to you,
i am not sure..is there any chance to open my webpage in firefox. for example i am browsing mywebsite using IE. when ever i click link of the page then automatically it will open in firefox. this option is not for all pages only for specified page.
thanks.
If this were the case, ie6 would have gone out long ago. The best you can do here, would be to check which browser they are using (get_browser if you are using php) and refuse to show content to people using browsers other than firefox.
Instead you could redirect them to a page explaining why they need to be using firefox to access your websites services (I guess a link to the firefox download page would be nice too)
Sorry, it's not possible from plain HTML to open a webpage in a different browser. You can, at most, open the page in a new window of the same browser.
However, what you ask is not completely impossible. You could write a browser plugin that handles links and runs the Firefox executable
I would seriously hope this isn't possible.
What you ask for is not possible , but you could display a warning to your users that the page works best in the desired browser.