当前位置: 首页 > news >正文

室内设计做效果图可以接单的网站网站的赚钱方式

室内设计做效果图可以接单的网站,网站的赚钱方式,云服务器开网站,黄山旅游插件安装搜插件selenium,安装添加config添加线程组右键线程组->添加->配置元件->jpgc - Chrome Driver Configoption和proxy不解释了添加Sampler右键线程组->添加->取样器->jpgc - WebDriver Samplerscript language 选择:JavaScript&…

插件安装

  • 搜插件selenium,安装

添加config

  • 添加线程组

  • 右键线程组->添加->配置元件->jp@gc - Chrome Driver Config

  • option和proxy不解释了

添加Sampler

  • 右键线程组->添加->取样器->jp@gc - WebDriver Sampler

  • script language 选择:JavaScript(可惜没有python)

  • 界面说明

  • Name - for the test that each Web Driver Sampler will have. This is used by the reports.

  • Parameters - is optional and allows the reader to inject variables used in the script section.

  • Script - allows the scripter to control the Web Driver and capture times and success/failure outcomes

DEMO代码及解释

https://jmeter-plugins.org/wiki/WebDriverSampler/
  • 示例代码

// 相当于python的from  import   java的importvar pkg = JavaImporter(org.openqa.selenium)// Start capturing the sampler timing 开始捕获取样WDS.sampleResult.sampleStart()// 代码块WDS.browser.get('http://114.116.2.138:8090/forum.php')
WDS.browser.findElement(pkg.By.id('ls_username')).sendKeys('admin')
// 等价于 WDS.browser.findElement(org.openqa.selenium.By.id('ls_username')).sendKeys('admin')WDS.browser.findElement(pkg.By.id('ls_password')).sendKeys('123456')
// js语法定义了一个 sleep函数 ,让你从python平滑过渡到 jsvar sleep = function(time) {var timeOut = newDate().getTime() + parseInt(time, 10);while(newDate().getTime() <= timeOut) {}
}WDS.browser.findElement(pkg.By.cssSelector('.pn.vm')).click()
sleep(3000)// 断言部分if(WDS.browser.getCurrentUrl() != 'http://114.116.2.138:8090/forum.php') {WDS.sampleResult.setSuccessful(false)WDS.sampleResult.setResponseMessage('Expected url to be XXX')
}
else{WDS.sampleResult.setSuccessful(true)
}// Stop the sampler timing 停止取样WDS.sampleResult.sampleEnd()
  • WDS就是Web Driver Sampler

  • 麻烦的是你可能并没有自动补齐(好像可以出来,但没研究),这个对象有哪些属性方法

  • 深入的研究要看

https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/package-summary.html
  • 比如显式等待的一个应用

var pkg = JavaImporter(org.openqa.selenium, org.openqa.selenium.support.ui)
var wait = new pkg.WebDriverWait(WDS.browser, 5, 0.5)
wait.until(pkg.ExpectedConditions.presenceOfElementLocated(pkg.By.cssSelector('ul.suggestions')))

关于WDS的一些属性

  1. WDS.name - is the value provided in the Name field (above).

  1. WDS.vars - JMeterVariables - e.g.

vars.get("VAR1"); vars.put("VAR2","value"); vars.remove("VAR3"); vars.putObject("OBJ1",new Object());

  1. WDS.props - JMeterProperties (class java.util.Properties) - e.g.

props.get("START.HMS"); props.put("PROP1","1234");

  1. WDS.ctx - JMeterContext

  1. WDS.parameters - is the value provided in the Parameters field (above).

  1. WDS.args - is an array of the strings provided in the Parameters field, but split by the space ' ' character. This allows the scripter to provide a number of strings as input and access each one by position.

  1. WDS.log - is a Logger instance to allow the scripter to debug their scripts by writing information to the jmeter log file (JMeter provides a GUI for its log entries)

  1. WDS.browser - is the configured Web Driver browser that the scripter can script and control. There is detailed documentation on this object on the Selenium Javadocs page.

  1. WDS.sampleResult - is used to log when the timing should start and end. Furthermore, the scripter can set success/failure state on this object, and this SampleResult is then used by the JMeter reporting suite. The JMeter javadocs provide more information on the API of this object

http://www.yayakq.cn/news/611110/

相关文章:

  • 音乐影视类网站建设杭州网站建设网络
  • 鞍山企业做网站手机网站返回跳转页面代码
  • 纪检网站建设动态主题wordpress信用卡
  • 有没有免费做网站的小程序开发教程文档
  • 咸宁网站建设价格帮别人做网站交税
  • 南宁 网站建设 公司做贺卡 网站
  • 温州做网站最好的用wordpress开发网站
  • 外贸类网站建设全国最大房产网络平台
  • 如何破解wordpress站长工具推荐seo综合查询
  • 品牌建设的作用和意义关键词优化上海
  • 佛山网站推广成都私家花园设计公司哪家好
  • 吉林省建设厅网站查询东莞建设教育网站
  • 做培训的网站建设中国林业工程建设协会官方网站
  • 网站维护 设计北京响应式网站设计
  • 淮安涟水网站建设电子商务网站建设 第二版
  • 潍坊做网站多少钱长沙58同城招聘网找工作招聘信息
  • 昭通网站开发公司网课平台
  • 云南专业网站建站建设制作网线的心得体会
  • 南通给公司做网站的自己建网站的优势
  • 一站式网站搭建什么网站做招聘效果好
  • 阿里云购买网站空间太原广告传媒有限公司
  • 哪个网站有激光打标业务做搜索引擎营销的实现方法有
  • 视频上传下载网站建设趣闻网站如何做
  • 用eclipse做网站模板推广图片模版
  • 多举措加强局门户网站建设网页制作专业搜题
  • 公司网站怎么注销网站建设用到的技术
  • 微网站需要备案吗别人建的网站怎么修改代码
  • 浙江手机版建站系统信息.tv做网站怎么样
  • 外贸soho建站公司潍坊网站建设价格低
  • 北京海淀国税局网站网站建设及解析流程