<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scripts for Browser Synthetic Monitoring in AppD Archive</title>
    <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728530#M3139</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO42/Jobs" target="_self" rel="nofollow noopener noreferrer"&gt;This link&lt;/A&gt; should be a good start up point.&lt;/P&gt;

&lt;P&gt;You can use Selenium IDE add-on in Firfox or any other browser to record your selenium steps&lt;/P&gt;

&lt;P&gt;and then select File &amp;gt; Export Test Case As &amp;gt; Python 2/ Unittest/ Webdriver. You can use that script and develop/edit from there.&lt;/P&gt;

&lt;P&gt;For more on selenium python: &lt;A href="http://selenium-python.readthedocs.io/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://selenium-python.readthedocs.io/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 05:38:16 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2016-07-14T05:38:16Z</dc:date>
    <item>
      <title>Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728529#M3138</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;Could someone help me with a script to create a new job in browser synthetic monitoring in Saas Controller.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 12:44:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728529#M3138</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-03-16T12:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728530#M3139</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.appdynamics.com/display/PRO42/Jobs" target="_self" rel="nofollow noopener noreferrer"&gt;This link&lt;/A&gt; should be a good start up point.&lt;/P&gt;

&lt;P&gt;You can use Selenium IDE add-on in Firfox or any other browser to record your selenium steps&lt;/P&gt;

&lt;P&gt;and then select File &amp;gt; Export Test Case As &amp;gt; Python 2/ Unittest/ Webdriver. You can use that script and develop/edit from there.&lt;/P&gt;

&lt;P&gt;For more on selenium python: &lt;A href="http://selenium-python.readthedocs.io/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://selenium-python.readthedocs.io/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 05:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728530#M3139</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-07-14T05:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728531#M3140</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I've used the Selium add on to create a script that logs in to our site.&amp;nbsp; I get a screenshot that our page loaded through the job, but then it times out after 60 seconds.&amp;nbsp; It seems like it is loading the site, but then not continuing with the rest of the steps.&amp;nbsp; I've tried adjusting the wait time in the script, but that's just the timeout.&amp;nbsp; I don't see any indication of what the script is waiting on?&amp;nbsp; The script I'm trying to use is below.&lt;/P&gt;

&lt;P&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;from selenium.webdriver.firefox.webdriver import WebDriver&lt;BR /&gt;from selenium.webdriver.common.action_chains import ActionChains&lt;BR /&gt;import time, unittest&lt;BR /&gt;&lt;BR /&gt;def is_alert_present(wd):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.switch_to_alert().text&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return False&lt;BR /&gt;&lt;BR /&gt;class LSOL_Login_Loads(unittest.TestCase):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def setUp(self):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.wd = WebDriver()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.wd.implicitly_wait(30)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def test_LSOL_Login_Loads(self):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success = True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd = self.wd&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.get("&lt;A href="http://www.landstaronline.com/Public/Login.aspx" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.landstaronline.com/Public/Login.aspx&lt;/A&gt;")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("USER").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("USER").clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("USER").send_keys("USERID")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("PASSWORD").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("PASSWORD").clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("PASSWORD").send_keys("PASSWORD")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wd.find_element_by_id("Submit").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.assertTrue(success)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def tearDown(self):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.wd.quit()&lt;BR /&gt;&lt;BR /&gt;if __name__ == '__main__':&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unittest.main()&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 11:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728531#M3140</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-10-03T11:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728532#M3141</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am wondering if the script is unable to find a element by id or something else. because the script looks quite simple and stright, unless its stuck unable to execute a statement it should not take long..&lt;/P&gt;

&lt;P&gt;Also, I wonder if you have checked the error log within AppDynamics controller? (USer Experiance &amp;gt; Sessions &amp;gt; open a failed script from the list &amp;gt; Show script output)&lt;/P&gt;

&lt;P&gt;Alternatively, have you tried to execute the scipt outside of AppDynamics? like say Firfox..&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 01:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728532#M3141</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-10-04T01:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728533#M3142</link>
      <description>&lt;P&gt;Try to use XPath instead of id as well. XPath can give you much exact definition for objects in DOM model. We had the same problem with css-selector because there was 2 or more css-selectors with same name&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 04:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728533#M3142</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-10-12T04:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728534#M3143</link>
      <description>&lt;P&gt;I did look at the script output, and all it tells me is that it's "Executing a WebDriver script" and then times out 30 seconds (or whatever timeout I set) later.&amp;nbsp; this leads me to believe it's not even trying the next step.&amp;nbsp; I would assume if it couldn't find an element on the page, I would get an error.&lt;/P&gt;

&lt;P&gt;I created the script using Selenium builder for Firefox, not sure how I would get the Xpath id's from this setup?&amp;nbsp; I haven't tested the script outside of AppDynamics either...I will look into doing that and see where that get's me.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 11:19:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728534#M3143</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-10-12T11:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728535#M3144</link>
      <description>&lt;P&gt;Ok, so here is the latest script I have:&lt;/P&gt;

&lt;P&gt;try:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.get("&lt;A href="http://www.landstaronline.com/Public/Login.aspx" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.landstaronline.com/Public/Login.aspx&lt;/A&gt;")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("USER").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("USER").clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("USER").send_keys("USERID")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("PASSWORD").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("PASSWORD").clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("PASSWORD").send_keys("PASSWORD")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.find_element_by_id("Submit").click()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if driver.title != "LandstarOnline Home Page":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; success = False&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("verifyTitle failed")&lt;BR /&gt;finally:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.quit()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not success:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise Exception("Test failed.")&lt;/P&gt;

&lt;P&gt;It runs, and has a visual load time of .9 seconds, so it is kicking off the first step of getting the URL, but I get no other errors, and the screenshot shows a fully loaded page with nothing entered into the text boxes.&amp;nbsp; I have also run this script throug Sauce OnDemand and it works as it should.&amp;nbsp; I had to rename the driver from wd=webdriver to just use driver, but other than that the same script works fine in Sauce.&amp;nbsp; Script output is below as well.&lt;/P&gt;



&lt;PRE class="ads-synth-output-text ng-binding"&gt;0.00s   [INFO]  Starting measurement [161012_MR_27ZB]
0.25s   [INFO]  Executing WebDriver script
20.25s  [ERROR] Script timed out after 20 seconds&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Oct 2016 12:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728535#M3144</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-10-12T12:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728536#M3145</link>
      <description>&lt;P&gt;Are you still facing the issue? I created a job with the same script and a timeout of 100 and it fails in verification:&lt;/P&gt;

&lt;PRE class="ads-synth-output-text ng-binding"&gt;0.00s   [INFO]  Starting measurement [161116_RQ_5BTS]
0.15s   [INFO]  Executing WebDriver script
14.90s  [INFO]  verifyTitle failed
14.90s  [ERROR] Exception: Test failed.
Traceback (most recent call last):
Line 16, in &amp;lt;synthetic script&amp;gt;
	raise Exception("Test failed.")&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Nov 2016 23:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728536#M3145</guid>
      <dc:creator>Mayuresh_Kshirs</dc:creator>
      <dc:date>2016-11-16T23:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts for Browser Synthetic Monitoring</title>
      <link>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728537#M3146</link>
      <description>&lt;P&gt;I'm sort of still having this issue. &amp;nbsp;The script failed for you because the username and password in the script I posted here are not valid. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;Support has responded to my ticket and acknowledged there is a bug right now with how our site scripting operates and how the synthetic job emulates IE 10 and 11. &amp;nbsp;The script works fine using Firefox or Chrome, so that's what we've done for now. &amp;nbsp;I was told that a bug was created and would be resolved in a future release.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 12:28:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/AppD-Archive/Scripts-for-Browser-Synthetic-Monitoring/m-p/728537#M3146</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2016-11-21T12:28:29Z</dc:date>
    </item>
  </channel>
</rss>

