Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
selenium_plugin [2020/04/26 03:33]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-=====Selenium Plugin===== 
-//Selenium// plugin provides a set of MScript functions to perform test automation on your web application. Just like other plugins, you can enable it for each model and can be used with other plugins together. 
  
----- 
-==== Plugin Overview ==== 
-//Selenium plugin// uses [[http://seleniumhq.org/|Selenium]] to drive your web applications with real browser in real-time as model is executing. You can use either //MScript// or java to call //Selenium// to drive your web applications. MScript is an xml-based scripting and //Selenium plugin// provides a rich set of [[http://testoptimal.com/javaDoc/reference/com/webmbt/plugin/SeleniumPlugin.html | MScript Functions]]. 
- 
-Selenium supports various browsers to test your web applications as well as a simulated browser which offers much higher performance and more suited for running load testing when you need to simulate hundreds or thousands of users running models simultaneously. 
- 
-[[http://testoptimal.com/javaDoc/reference/com/webmbt/plugin/SeleniumPlugin.html | MScript Functions]] 
- 
----- 
-==== Chrome Config & Custom Profile ==== 
- 
-You can config //Google Chrome// browser by setting //webdriver.properties// You may need to config this plugin using the information provided in the links below: 
- 
-  * [[http://peter.sh/experiments/chromium-command-line-switches/|Google Chrome command line switches]] 
- 
-To set up //Chrome// browser to use a custom profile, edit //webdriver_Selenium.properties// and add/update the following setting: 
-  chrome.profile.loc=/path/to/your/custom/profile 
-   
-For more information about //Chrome Driver//, please refer to [[https://sites.google.com/a/chromium.org/chromedriver/home | Chrome Driver User Documentation]] 
- 
----- 
-==== WebDriver Config ==== 
-You may also configure //Selenium/WebDriver// by setting //webdriver.properties// file.  See [[example webdriver.properties]]. 
- 
-By default 32 bit IE driver is used, however you can change this default to 64 bit IE driver by editing webdriver.properties file.  Alternatively you can call Selenium function $setCapabilityString() to dynamically change which IE driver to be used to launch AUT: 
- 
-  $Selenium.setCapabilityString('IE.driver','IEDriverServer_64BIT.exe') 
-  or   
-  $Selenium.setCapabilityString('IE.driver','IEDriverServer_32BIT.exe') 
- 
----- 
-==== Firefox Custom Profile ==== 
- 
-This section assumes that you already has created a custom profile using Firefox Profile Manager.  If not, following the instruction at {{https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles | How to Create Firefox Profile}}. 
- 
-You may use custom Firefox profile by setting //firefox.profile.loc// in //webdriver_Selenium.properties// to point to the location/folder where your custom profile is stored: 
-  firefox.profile.loc=C:/path/to/my/filefox/profile 
-   
-   
-Alternatively you can also set this during model execution in MBT_start trigger: 
-   <action lid="9" code="$Selenium.setCapabilityString('firefox.profile.loc','C:/path/to/my/filefox/profile')"/> 
- 
----- 
-==== Element Locator ==== 
- 
-Need help with element locator?  Check out these links: 
-  * [[https://www.simple-talk.com/dotnet/.net-framework/xpath,-css,-dom-and-selenium-the-rosetta-stone/ | Michael Sorens' post on Selenium locator]]: 
-  * [[http://www.simple-talk.com/content/file.ashx?file=4937 | Xpath * CSS * DOM * Selenium: Rosetta Stone and Cookbook, page 1]] 
-  * [[http://www.simple-talk.com/content/file.ashx?file=4938 | Xpath * CSS * DOM * Selenium: Rosetta Stone and Cookbook, page 2]] 
-  * [[http://www.techbeamers.com/use-locators-selenium/ | 8 Ways To Use Locators For Selenium Testing]] 
- 
-Tools to help find the web element locator: 
-  * Firefox add-on [[https://addons.mozilla.org/en-US/firefox/addon/element-locator-for-webdriv/ | WebDriver Element Locator]] 
-  * [[http://www.softwaretestinghelp.com/locate-elements-in-chrome-ie-selenium-tutorial-7/ | How to locate elements in Chrome and IE]]